aboutsummaryrefslogtreecommitdiffstats
path: root/pg-datastore.lisp
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-07-25 22:45:04 +0200
committerGravatar Tom Willemse2013-07-25 22:45:04 +0200
commit9aed8783056b6ac220289a096e342f98a4b14e1c (patch)
tree40720b798852287af17d42665e370a5d614b1cf6 /pg-datastore.lisp
parentf897aa6287a139b9826422de2d04f1c074a86069 (diff)
downloadscrumli-9aed8783056b6ac220289a096e342f98a4b14e1c.tar.gz
scrumli-9aed8783056b6ac220289a096e342f98a4b14e1c.zip
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.
Diffstat (limited to 'pg-datastore.lisp')
-rw-r--r--pg-datastore.lisp7
1 files changed, 7 insertions, 0 deletions
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