annotate flys-artifacts/src/main/resources/datacage-sql/org-h2-driver.properties @ 992:5b467bc27eda

Datacage: Store facets of outs into datacage db at initial scan. flys-artifacts/trunk@2424 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 29 Jul 2011 13:29:29 +0000
parents c675b4a87201
children f61fe8b561d2
rev   line source
984
2b05c4a0c6fd Datacage: clear database before initial scan
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 983
diff changeset
1 delete.all.users = DELETE FROM users
986
70545233f8ee Datacage: Add users at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 984
diff changeset
2 user.id.nextval = SELECT NEXTVAL('USERS_ID_SEQ')
70545233f8ee Datacage: Add users at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 984
diff changeset
3 user.by.gid = SELECT id FROM users WHERE gid = ?
70545233f8ee Datacage: Add users at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 984
diff changeset
4 insert.user = INSERT INTO users (id, gid) VALUES (?, ?)
987
82ef338fee91 Datacage: Add collections at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 986
diff changeset
5 collection.by.gid = SELECT id FROM collections WHERE gid = ?
82ef338fee91 Datacage: Add collections at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 986
diff changeset
6 collection.id.nextval = SELECT NEXTVAL('COLLECTIONS_ID_SEQ')
82ef338fee91 Datacage: Add collections at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 986
diff changeset
7 insert.collection = INSERT INTO collections (id, gid, user_id, name) VALUES (?, ?, ?, ?)
988
dbe39e1fb5e7 Datacage: Add collection items at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 987
diff changeset
8 artifact.by.gid = SELECT id FROM artifacts WHERE gid = ?
dbe39e1fb5e7 Datacage: Add collection items at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 987
diff changeset
9 collection.item.id.nextval = SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ')
dbe39e1fb5e7 Datacage: Add collection items at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 987
diff changeset
10 insert.collection.item = INSERT INTO collection_items (id, collection_id, artifact_id) VALUES (?, ?, ?)
989
f3be883325ce Add artifacts into datacage db at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 988
diff changeset
11 artifact.id.nextval = SELECT NEXTVAL('ARTIFACTS_ID_SEQ')
f3be883325ce Add artifacts into datacage db at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 988
diff changeset
12 insert.artifact = INSERT INTO artifacts (id, gid, state) VALUES (?, ?, ?)
990
e573c4715d81 Add artifacts data into datacage db at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 989
diff changeset
13 artifact.data.id.nextval = SELECT NEXTVAL('ARTIFACT_DATA_ID_SEQ')
e573c4715d81 Add artifacts data into datacage db at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 989
diff changeset
14 insert.artifact.data = INSERT INTO artifact_data (id, artifact_id, kind, k, v) VALUES (?, ?, ?, ?, ?)
991
c675b4a87201 Store outs of artifacts into datacage db at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 990
diff changeset
15 out.id.nextval = SELECT NEXTVAL('OUTS_ID_SEQ')
c675b4a87201 Store outs of artifacts into datacage db at initial scan.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 990
diff changeset
16 insert.out = INSERT INTO outs (id, artifact_id, name, description, out_type) VALUES (?, ?, ?, ?, ?)
992
5b467bc27eda Datacage: Store
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 991
diff changeset
17 facet.id.nextval = SELECT NEXTVAL('FACETS_ID_SEQ')
5b467bc27eda Datacage: Store
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 991
diff changeset
18 insert.facet = INSERT INTO facets (id, out_id, name, num, state, description) VALUES (?, ?, ?, ?, ?, ?)

http://dive4elements.wald.intevation.org