Mercurial > dive4elements > framework
comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 273:22a90706d32d
Enables the artifact server to set the TTL of a specific collection via REST call.
artifacts/trunk@2070 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 07 Jun 2011 16:27:47 +0000 |
parents | a2df2b48d2aa |
children | 92166f7c3842 |
comparison
equal
deleted
inserted
replaced
272:2ce31a9414ff | 273:22a90706d32d |
---|---|
95 INNER JOIN artifacts a ON ci.artifact_id = a.id \ | 95 INNER JOIN artifacts a ON ci.artifact_id = a.id \ |
96 WHERE c.ttl IS NOT NULL \ | 96 WHERE c.ttl IS NOT NULL \ |
97 AND DATEDIFF('MILLISECOND', c.last_access, CURRENT_TIMESTAMP) > c.ttl \ | 97 AND DATEDIFF('MILLISECOND', c.last_access, CURRENT_TIMESTAMP) > c.ttl \ |
98 AND a.id NOT IN ($LOCKED_IDS$) | 98 AND a.id NOT IN ($LOCKED_IDS$) |
99 | 99 |
100 collections.update.ttl=UPDATE collections SET ttl = ? WHERE id = ? | |
101 | |
100 collections.touch.trigger.function = \ | 102 collections.touch.trigger.function = \ |
101 UPDATE collections SET last_access = current_timestamp \ | 103 UPDATE collections SET last_access = current_timestamp \ |
102 WHERE id IN \ | 104 WHERE id IN \ |
103 (SELECT c.id FROM collections c \ | 105 (SELECT c.id FROM collections c \ |
104 INNER JOIN collection_items ci ON c.id = ci.collection_id \ | 106 INNER JOIN collection_items ci ON c.id = ci.collection_id \ |