diff artifact-database/src/main/resources/sql/org-h2-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
line wrap: on
line diff
--- a/artifact-database/src/main/resources/sql/org-h2-driver.properties	Sun Mar 06 10:27:16 2011 +0000
+++ b/artifact-database/src/main/resources/sql/org-h2-driver.properties	Sun Mar 06 10:55:37 2011 +0000
@@ -54,7 +54,18 @@
         INNER JOIN attributes a ON ci.artifact_id = a.id \
         WHERE c.gid = ? AND a.gid = ?
 
+collection.item.set.attribute= \
+    UPDATE collections_items SET attribute = ? WHERE id IN ( \
+        SELECT ci.id FROM collections_items ci \
+            INNER JOIN collection c ON ci.collection_id = c.id \
+            INNER JOIN attributes a ON ci.artifact_id = a.id \
+            WHERE c.gid = ? AND a.gid = ?)
+
 # COLLECTIONS
+collections.touch.by.gid =\
+    UPDATE collection SET last_access = CURRENT_TIMESTAMP \
+        WHERE gid = ?
+
 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
 
 collections.id.by.gid=SELECT id FROM collections WHERE gid = ?

http://dive4elements.wald.intevation.org