comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 243:33b9cc23ac9b

Granularity of ttls should be milliseconds and not microseconds. artifacts/trunk@1678 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 13 Apr 2011 15:19:59 +0000
parents b35d32e507b6
children a2df2b48d2aa
comparison
equal deleted inserted replaced
242:b35d32e507b6 243:33b9cc23ac9b
13 AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl \ 13 AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl \
14 AND id NOT IN (SELECT DISTINCT artifact_id FROM collection_items) \ 14 AND id NOT IN (SELECT DISTINCT artifact_id FROM collection_items) \
15 AND id NOT IN ($LOCKED_IDS$) \ 15 AND id NOT IN ($LOCKED_IDS$) \
16 LIMIT 50 16 LIMIT 50
17 17
18 artifacts.select.gid=SELECT id, factory, data FROM artifacts WHERE gid = ?::uuid \ 18 artifacts.select.gid=SELECT id, ttl, factory, data FROM artifacts WHERE gid = ?::uuid \
19 AND (ttl IS NULL \ 19 AND (ttl IS NULL \
20 OR (DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) <= ttl) \ 20 OR (DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) <= ttl) \
21 OR id IN (SELECT artifact_id FROM collection_items)) \ 21 OR id IN (SELECT artifact_id FROM collection_items))
22 22
23 artifacts.get.id=SELECT id FROM artifacts WHERE gid = ? 23 artifacts.get.id=SELECT id FROM artifacts WHERE gid = ?
24 24
25 artifacts.replace=UPDATE artifacts SET \ 25 artifacts.replace=UPDATE artifacts SET \
26 creation = CURRENT_TIMESTAMP, last_access = CURRENT_TIMESTAMP, \ 26 creation = CURRENT_TIMESTAMP, last_access = CURRENT_TIMESTAMP, \

http://dive4elements.wald.intevation.org