diff flys-artifacts/src/main/resources/datacage-sql/org-postgresql-driver.properties @ 996:f61fe8b561d2

Datacage: delete artifacts at initial scan, too. Fixed problem with writing content of state data. flys-artifacts/trunk@2432 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 31 Jul 2011 19:47:41 +0000
parents
children c58da6dd15ed
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/flys-artifacts/src/main/resources/datacage-sql/org-postgresql-driver.properties	Sun Jul 31 19:47:41 2011 +0000
@@ -0,0 +1,19 @@
+delete.all.users = DELETE FROM users
+delete.all.artifacts = DELETE FROM artifacts
+user.id.nextval = SELECT NEXTVAL('USERS_ID_SEQ')
+user.by.gid = SELECT id FROM users WHERE gid = ?::uuid
+insert.user = INSERT INTO users (id, gid) VALUES (?, ?::uuid)
+collection.by.gid = SELECT id FROM collections WHERE gid = ?::uuid
+collection.id.nextval = SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
+insert.collection = INSERT INTO collections (id, gid, user_id, name) VALUES (?, ?::uuid, ?, ?)
+artifact.by.gid = SELECT id FROM artifacts WHERE gid = ?::uuid
+collection.item.id.nextval = SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ')
+insert.collection.item = INSERT INTO collection_items (id, collection_id, artifact_id) VALUES (?, ?, ?)
+artifact.id.nextval = SELECT NEXTVAL('ARTIFACTS_ID_SEQ')
+insert.artifact = INSERT INTO artifacts (id, gid, state) VALUES (?, ?::uuid, ?)
+artifact.data.id.nextval = SELECT NEXTVAL('ARTIFACT_DATA_ID_SEQ')
+insert.artifact.data = INSERT INTO artifact_data (id, artifact_id, kind, k, v) VALUES (?, ?, ?, ?, ?)
+out.id.nextval = SELECT NEXTVAL('OUTS_ID_SEQ')
+insert.out = INSERT INTO outs (id, artifact_id, name, description, out_type) VALUES (?, ?, ?, ?, ?)
+facet.id.nextval = SELECT NEXTVAL('FACETS_ID_SEQ')
+insert.facet = INSERT INTO facets (id, out_id, name, num, state, description) VALUES (?, ?, ?, ?, ?, ?)

http://dive4elements.wald.intevation.org