Mercurial > dive4elements > framework
diff artifact-database/src/main/resources/sql/org-h2-driver.properties @ 176:a0eff2227588
Added code to add artifacts to collections.
artifacts/trunk@1402 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 04 Mar 2011 17:51:15 +0000 |
parents | 16e6e661e6bf |
children | 535e4ea2ef9b |
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-h2-driver.properties Fri Mar 04 17:11:40 2011 +0000 +++ b/artifact-database/src/main/resources/sql/org-h2-driver.properties Fri Mar 04 17:51:15 2011 +0000 @@ -38,6 +38,16 @@ users.select.all=SELECT id, gid, name, role FROM users +collection.check.artifact=SELECT id FROM collections_items \ + WHERE artifact_id = ? AND collection_id = ? + +# COLLECTION ITEMS +collection.items.id.nextval=SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ') + +collection.items.insert=INSERT INTO collections_items \ + (id, collection_id, artifact_id, attribute) \ + VALUES (?, ?, ?, ?) + # COLLECTIONS collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')