Mercurial > dive4elements > framework
comparison artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 179:644fd11ddd9f
Added code to set attribute of a collection item.
artifacts/trunk@1405 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 06 Mar 2011 10:55:37 +0000 |
parents | 535e4ea2ef9b |
children | 38fbbeffe8fe |
comparison
equal
deleted
inserted
replaced
178:535e4ea2ef9b | 179:644fd11ddd9f |
---|---|
52 SELECT ci.attribute FROM collections_items ci \ | 52 SELECT ci.attribute FROM collections_items ci \ |
53 INNER JOIN collection c ON ci.collection_id = c.id \ | 53 INNER JOIN collection c ON ci.collection_id = c.id \ |
54 INNER JOIN attributes a ON ci.artifact_id = a.id \ | 54 INNER JOIN attributes a ON ci.artifact_id = a.id \ |
55 WHERE c.gid = ?::uuid AND a.gid = ?::uuid | 55 WHERE c.gid = ?::uuid AND a.gid = ?::uuid |
56 | 56 |
57 collection.item.set.attribute= \ | |
58 UPDATE collections_items SET attribute = ? WHERE id IN ( \ | |
59 SELECT ci.id FROM collections_items ci \ | |
60 INNER JOIN collection c ON ci.collection_id = c.id \ | |
61 INNER JOIN attributes a ON ci.artifact_id = a.id \ | |
62 WHERE c.gid = ?::uuid AND a.gid = ?::uuid) | |
63 | |
57 # COLLECTIONS | 64 # COLLECTIONS |
65 collections.touch.by.gid =\ | |
66 UPDATE collection SET last_access = CURRENT_TIMESTAMP \ | |
67 WHERE gid = ?::uuid | |
68 | |
58 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ') | 69 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ') |
59 | 70 |
60 collections.id.by.gid=SELECT id FROM collections WHERE gid = ?::uuid | 71 collections.id.by.gid=SELECT id FROM collections WHERE gid = ?::uuid |
61 | 72 |
62 delete.collection.items=DELETE FROM collection_items WHERE collection_id = ? | 73 delete.collection.items=DELETE FROM collection_items WHERE collection_id = ? |