diff artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 184:a22b7e367b25

Added Backend code to list the collection items in a collection. artifacts/trunk@1410 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 07 Mar 2011 11:37:49 +0000
parents 38fbbeffe8fe
children a85d889a1b0d
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Mon Mar 07 11:13:39 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Mon Mar 07 11:37:49 2011 +0000
@@ -75,6 +75,11 @@
 
 collection.item.delete=DELETE FROM collections_items WHERE id = ?
 
+collection.items.list.gid= \
+    SELECT a.gid, ci.attribute FROM collections_items ci \
+    INNER JOIN artifacts a ON ci.artifact_id = a.id \
+    WHERE ci.id IN (SELECT id FROM collections WHERE gid = ?)
+
 # COLLECTIONS
 collections.touch.by.gid =\
     UPDATE collection SET last_access = CURRENT_TIMESTAMP \

http://dive4elements.wald.intevation.org