sascha@984: delete.all.users = DELETE FROM users sascha@986: user.id.nextval = SELECT NEXTVAL('USERS_ID_SEQ') sascha@986: user.by.gid = SELECT id FROM users WHERE gid = ? sascha@986: insert.user = INSERT INTO users (id, gid) VALUES (?, ?) sascha@987: collection.by.gid = SELECT id FROM collections WHERE gid = ? sascha@987: collection.id.nextval = SELECT NEXTVAL('COLLECTIONS_ID_SEQ') sascha@987: insert.collection = INSERT INTO collections (id, gid, user_id, name) VALUES (?, ?, ?, ?) sascha@988: artifact.by.gid = SELECT id FROM artifacts WHERE gid = ? sascha@988: collection.item.id.nextval = SELECT NEXTVAL('COLLECTION_ITEMS_ID_SEQ') sascha@988: insert.collection.item = INSERT INTO collection_items (id, collection_id, artifact_id) VALUES (?, ?, ?)