sascha@996: delete.all.users = DELETE FROM users sascha@996: delete.all.artifacts = DELETE FROM artifacts sascha@996: user.id.nextval = SELECT NEXTVAL('USERS_ID_SEQ') sascha@996: user.by.gid = SELECT id FROM users WHERE gid = ?::uuid sascha@996: insert.user = INSERT INTO users (id, gid) VALUES (?, ?::uuid) sascha@996: collection.by.gid = SELECT id FROM collections WHERE gid = ?::uuid sascha@996: collection.id.nextval = SELECT NEXTVAL('COLLECTIONS_ID_SEQ') sascha@996: insert.collection = INSERT INTO collections (id, gid, user_id, name) VALUES (?, ?::uuid, ?, ?) sascha@996: artifact.by.gid = SELECT id FROM artifacts WHERE gid = ?::uuid sascha@996: collection.item.id.nextval = SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ') sascha@996: insert.collection.item = INSERT INTO collection_items (id, collection_id, artifact_id) VALUES (?, ?, ?) sascha@996: artifact.id.nextval = SELECT NEXTVAL('ARTIFACTS_ID_SEQ') sascha@996: insert.artifact = INSERT INTO artifacts (id, gid, state) VALUES (?, ?::uuid, ?) sascha@996: artifact.data.id.nextval = SELECT NEXTVAL('ARTIFACT_DATA_ID_SEQ') sascha@996: insert.artifact.data = INSERT INTO artifact_data (id, artifact_id, kind, k, v) VALUES (?, ?, ?, ?, ?) sascha@996: out.id.nextval = SELECT NEXTVAL('OUTS_ID_SEQ') sascha@996: insert.out = INSERT INTO outs (id, artifact_id, name, description, out_type) VALUES (?, ?, ?, ?, ?) sascha@996: facet.id.nextval = SELECT NEXTVAL('FACETS_ID_SEQ') sascha@996: insert.facet = INSERT INTO facets (id, out_id, name, num, state, description) VALUES (?, ?, ?, ?, ?, ?)