From 9aed8783056b6ac220289a096e342f98a4b14e1c Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 25 Jul 2013 22:45:04 +0200 Subject: Add user filter Users can now either look at the whole list or only tasks assigned to them. Currently this waits for the refresh to change the list, this should be fixed in the future. --- pg-datastore.lisp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pg-datastore.lisp') diff --git a/pg-datastore.lisp b/pg-datastore.lisp index 39e2646..5505de1 100644 --- a/pg-datastore.lisp +++ b/pg-datastore.lisp @@ -60,6 +60,13 @@ (query (:order-by (:select :* (:as (:md5 'assignee) 'md5) :from 'story) 'priority) :alists))) +(defmethod datastore-get-stories-for ((datastore pg-datastore) username) + (with-connection (connection-spec datastore) + (query (:order-by (:select :* (:as (:md5 'assignee) 'md5) + :from 'story + :where (:= 'assignee username)) + 'priority) :alists))) + (defmethod datastore-get-story ((datastore pg-datastore) id) (with-connection (connection-spec datastore) (append (query (:select :* (:as (:md5 'assignee) 'md5) :from 'story -- cgit v1.2.3-54-g00ecf