diff artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 175:16e6e661e6bf

Added code to delete collections. artifacts/trunk@1401 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 04 Mar 2011 17:11:40 +0000
parents 940ed629419f
children a0eff2227588
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Fri Mar 04 16:43:03 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Fri Mar 04 17:11:40 2011 +0000
@@ -41,6 +41,12 @@
 # COLLECTIONS
 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
 
+collections.id.by.gid=SELECT id FROM collections WHERE gid = ?::uuid
+
+delete.collection.items=DELETE FROM collection_items WHERE collection_id = ?
+
+delete.collection=DELETE FROM collections WHERE id = ?
+
 delete.user.collection.items= \
     DELETE FROM collection_items WHERE collection_id IN \
     (SELECT id FROM collections WHERE owner_id = ?)

http://dive4elements.wald.intevation.org