annotate flys-artifacts/src/main/resources/datacage-sql/org-postgresql-driver.properties @ 1003:c58da6dd15ed

Datacage: Update collection names on change. Remove artifacts from collections. flys-artifacts/trunk@2443 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 01 Aug 2011 16:53:54 +0000
parents f61fe8b561d2
children 0e8c03b69627
rev   line source
996
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 delete.all.users = DELETE FROM users
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2 delete.all.artifacts = DELETE FROM artifacts
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 user.id.nextval = SELECT NEXTVAL('USERS_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4 user.by.gid = SELECT id FROM users WHERE gid = ?::uuid
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5 insert.user = INSERT INTO users (id, gid) VALUES (?, ?::uuid)
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6 collection.by.gid = SELECT id FROM collections WHERE gid = ?::uuid
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 collection.id.nextval = SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 insert.collection = INSERT INTO collections (id, gid, user_id, name) VALUES (?, ?::uuid, ?, ?)
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 artifact.by.gid = SELECT id FROM artifacts WHERE gid = ?::uuid
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 collection.item.id.nextval = SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 insert.collection.item = INSERT INTO collection_items (id, collection_id, artifact_id) VALUES (?, ?, ?)
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 artifact.id.nextval = SELECT NEXTVAL('ARTIFACTS_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 insert.artifact = INSERT INTO artifacts (id, gid, state) VALUES (?, ?::uuid, ?)
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 artifact.data.id.nextval = SELECT NEXTVAL('ARTIFACT_DATA_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 insert.artifact.data = INSERT INTO artifact_data (id, artifact_id, kind, k, v) VALUES (?, ?, ?, ?, ?)
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 out.id.nextval = SELECT NEXTVAL('OUTS_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 insert.out = INSERT INTO outs (id, artifact_id, name, description, out_type) VALUES (?, ?, ?, ?, ?)
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 facet.id.nextval = SELECT NEXTVAL('FACETS_ID_SEQ')
f61fe8b561d2 Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 insert.facet = INSERT INTO facets (id, out_id, name, num, state, description) VALUES (?, ?, ?, ?, ?, ?)
1003
c58da6dd15ed Datacage: Update collection names on change. Remove artifacts from collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 996
diff changeset
20
c58da6dd15ed Datacage: Update collection names on change. Remove artifacts from collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 996
diff changeset
21 update.collection.name = UPDATE collections SET name = ? WHERE gid = ?::uuid
c58da6dd15ed Datacage: Update collection names on change. Remove artifacts from collections.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 996
diff changeset
22 delete.artifact.from.collection = DELETE FROM collection_items WHERE collection_id = ? AND artifact_id = ?

http://dive4elements.wald.intevation.org