comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 159:db0d20440b92

Added code to create collections. artifacts/trunk@1384 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 03 Mar 2011 12:13:24 +0000
parents 5369582d4fbf
children c9c27aca2f70
comparison
equal deleted inserted replaced
158:d718a4d55662 159:db0d20440b92
37 users.delete.collections=DELETE FROM collections where owner_id = ? 37 users.delete.collections=DELETE FROM collections where owner_id = ?
38 38
39 users.select.all=SELECT id, gid, name, role FROM users 39 users.select.all=SELECT id, gid, name, role FROM users
40 40
41 # COLLECTIONS 41 # COLLECTIONS
42 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
42 43
43 delete.user.collection.items= \ 44 delete.user.collection.items= \
44 DELETE FROM collection_items WHERE collection_id IN \ 45 DELETE FROM collection_items WHERE collection_id IN \
45 (SELECT id FROM collections WHERE owner_id = ?) 46 (SELECT id FROM collections WHERE owner_id = ?)
47
48 collections.insert= \
49 INSERT INTO collections (id, gid, name, owner_id, creation, last_access, ttl) \
50 VALUES (?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)
46 51
47 users.collections=SELECT collection_id, gid, name FROM collections WHERE owner_id = ? 52 users.collections=SELECT collection_id, gid, name FROM collections WHERE owner_id = ?
48 users.collection.ids=SELECT collection_id FROM collections WHERE owner_id = ? 53 users.collection.ids=SELECT collection_id FROM collections WHERE owner_id = ?
49 54
50 users.delete.all.collections=DELETE FROM collections WHERE owner_id = ? 55 users.delete.all.collections=DELETE FROM collections WHERE owner_id = ?
51 56
52 artifacts.in.one.collection.only=\ 57 artifacts.in.one.collection.only= \
53 SELECT artifact_id FROM collection_items\ 58 SELECT artifact_id FROM collection_items\
54 WHERE collection_id = ? AND\ 59 WHERE collection_id = ? AND\
55 artifact_id NOT IN (SELECT DISTINCT artifact_id FROM collection_items WHERE collection_id <> ?) 60 artifact_id NOT IN (SELECT DISTINCT artifact_id FROM collection_items WHERE collection_id <> ?)
56 61
57 outdate.artifacts.collection=UPDATE artifacts \ 62 outdate.artifacts.collection=UPDATE artifacts \

http://dive4elements.wald.intevation.org