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

Added new collection specific sql statements. artifacts/trunk@1554 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 24 Mar 2011 11:28:26 +0000
parents 199f0e553e3a
children 2d90d5cfe8f9
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Wed Mar 23 16:23:52 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-postgresql-driver.properties	Thu Mar 24 11:28:26 2011 +0000
@@ -29,7 +29,7 @@
 
 users.id.nextval=SELECT NEXTVAL('USERS_ID_SEQ')
 
-users.insert=INSERT INTO users (id, gid, name, role) VALUES (?, ?, ?, ?)
+users.insert=INSERT INTO users (id, gid, name, role) VALUES (?, ?::uuid, ?, ?)
 
 users.select.id.by.gid=SELECT id FROM users WHERE gid = ?::uuid
 users.select.gid=SELECT id, name, role FROM users WHERE gid = ?::uuid
@@ -119,6 +119,10 @@
     SELECT c.gid, c.name, c.creation, u.gid FROM \
     collections c LEFT OUTER JOIN users u ON c.owner_id = u.id
 
+collections.select.by.gid= \
+    SELECT id, name, owner_id, creation, last_access, attribute \
+    FROM collections WHERE gid = ?
+
 users.collections=SELECT collection_id, gid, name FROM collections WHERE owner_id = ?
 users.collection.ids=SELECT collection_id FROM collections WHERE owner_id = ?
 

http://dive4elements.wald.intevation.org