comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 178:535e4ea2ef9b

Added code to get the attribute of a collection item artifacts/trunk@1404 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 06 Mar 2011 10:27:16 +0000
parents a0eff2227588
children 644fd11ddd9f
comparison
equal deleted inserted replaced
177:77cd37a93fca 178:535e4ea2ef9b
45 collection.items.id.nextval=SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ') 45 collection.items.id.nextval=SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ')
46 46
47 collection.items.insert=INSERT INTO collections_items \ 47 collection.items.insert=INSERT INTO collections_items \
48 (id, collection_id, artifact_id, attribute) \ 48 (id, collection_id, artifact_id, attribute) \
49 VALUES (?, ?, ?, ?) 49 VALUES (?, ?, ?, ?)
50
51 collection.item.get.attribute= \
52 SELECT ci.attribute FROM collections_items ci \
53 INNER JOIN collection c ON ci.collection_id = c.id \
54 INNER JOIN attributes a ON ci.artifact_id = a.id \
55 WHERE c.gid = ? AND a.gid = ?
50 56
51 # COLLECTIONS 57 # COLLECTIONS
52 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ') 58 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
53 59
54 collections.id.by.gid=SELECT id FROM collections WHERE gid = ? 60 collections.id.by.gid=SELECT id FROM collections WHERE gid = ?

http://dive4elements.wald.intevation.org