annotate artifact-database/src/main/resources/sql/org-h2-driver.properties @ 33:251e8904d6c2

Make the Interfaces Serializable to make them usable in the Artifactdatabase. Bug Fixed in SQL-Statement artifacts/trunk@81 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 14 Sep 2009 13:36:35 +0000
parents c2d53bd30ab8
children 5e4bc24ea438
rev   line source
14
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 artifacts.id.nextval=SELECT NEXTVAL('ARTIFACTS_ID_SEQ')
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 artifacts.insert=INSERT INTO artifacts \
32
c2d53bd30ab8 Re-factored artifact API for better integration of background processing.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 30
diff changeset
4 (id, gid, creation, last_access, ttl, data) \
33
251e8904d6c2 Make the Interfaces Serializable to make them usable in the Artifactdatabase.
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
5 VALUES (?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?, ?)
14
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 artifacts.update=UPDATE artifacts SET last_access = CURRENT_TIMESTAMP, \
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8 data = ? WHERE id = ?
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 artifacts.touch=UPDATE last_access = CURRENT_TIMESTAMP WHERE id = ?
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11
30
88972c6daa4f Added a cleanup thread which periodically removes
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 14
diff changeset
12 artifacts.outdated=SELECT id, data FROM artifacts WHERE ttl IS NOT NULL \
88972c6daa4f Added a cleanup thread which periodically removes
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 14
diff changeset
13 AND CURRENT_TIMESTAMP - last_access > ttl LIMIT 50
14
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 artifacts.select.gid=SELECT id, last_access, ttl, data FROM artifacts WHERE gid = ?
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16
0d16d1bb2df0 Initial checkin of artigact persistents back by database.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 artifacts.delete=DELETE FROM artifacts WHERE id = ?

http://dive4elements.wald.intevation.org