comparison artifact-database/src/main/resources/sql/org-postgresql-driver.properties @ 191:3bce5556a2e5

Fixed some sql statements that contained typos. artifacts/trunk@1421 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 08 Mar 2011 09:08:15 +0000
parents a85d889a1b0d
children 949d69ad3756
comparison
equal deleted inserted replaced
190:7acf4a325bfe 191:3bce5556a2e5
48 (id, collection_id, artifact_id, attribute) \ 48 (id, collection_id, artifact_id, attribute) \
49 VALUES (?, ?, ?, ?) 49 VALUES (?, ?, ?, ?)
50 50
51 collection.item.get.attribute= \ 51 collection.item.get.attribute= \
52 SELECT ci.attribute FROM collection_items ci \ 52 SELECT ci.attribute FROM collection_items ci \
53 INNER JOIN collection c ON ci.collection_id = c.id \ 53 INNER JOIN collections c ON ci.collection_id = c.id \
54 INNER JOIN attributes a ON ci.artifact_id = a.id \ 54 INNER JOIN artifacts 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= \ 57 collection.item.set.attribute= \
58 UPDATE collection_items SET attribute = ? WHERE id IN ( \ 58 UPDATE collection_items SET attribute = ? WHERE id IN ( \
59 SELECT ci.id FROM collection_items ci \ 59 SELECT ci.id FROM collection_items ci \
60 INNER JOIN collection c ON ci.collection_id = c.id \ 60 INNER JOIN collections c ON ci.collection_id = c.id \
61 INNER JOIN attributes a ON ci.artifact_id = a.id \ 61 INNER JOIN artifacts a ON ci.artifact_id = a.id \
62 WHERE c.gid = ?::uuid AND a.gid = ?::uuid) 62 WHERE c.gid = ?::uuid AND a.gid = ?::uuid)
63 63
64 collection.item.id.cid.aid= \ 64 collection.item.id.cid.aid= \
65 SELECT ci.id, c.collection_id, c.artifact_id FROM collection_items ci \ 65 SELECT ci.id, c.collection_id, c.artifact_id FROM collection_items ci \
66 INNER JOIN collection c ON ci.collection_id = c.id \ 66 INNER JOIN collection c ON ci.collection_id = c.id \
80 INNER JOIN artifacts a ON ci.artifact_id = a.id \ 80 INNER JOIN artifacts a ON ci.artifact_id = a.id \
81 WHERE ci.id IN (SELECT id FROM collections WHERE gid = ?::uuid) 81 WHERE ci.id IN (SELECT id FROM collections WHERE gid = ?::uuid)
82 82
83 # COLLECTIONS 83 # COLLECTIONS
84 collections.touch.by.gid =\ 84 collections.touch.by.gid =\
85 UPDATE collection SET last_access = CURRENT_TIMESTAMP \ 85 UPDATE collections SET last_access = CURRENT_TIMESTAMP \
86 WHERE gid = ?::uuid 86 WHERE gid = ?::uuid
87 87
88 collections.touch.by.id =\ 88 collections.touch.by.id =\
89 UPDATE collection SET last_access = CURRENT_TIMESTAMP \ 89 UPDATE collections SET last_access = CURRENT_TIMESTAMP \
90 WHERE id = ? 90 WHERE id = ?
91 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ') 91 collections.id.nextval=SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
92 92
93 collections.id.by.gid=SELECT id FROM collections WHERE gid = ?::uuid 93 collections.id.by.gid=SELECT id FROM collections WHERE gid = ?::uuid
94 94

http://dive4elements.wald.intevation.org