Mercurial > dive4elements > framework
comparison artifact-database/src/main/resources/sql/org-h2-driver.properties @ 543:e9abf747f6ce
issue1847 Remove limit and break on empty ids
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 03 Sep 2015 17:45:16 +0200 |
parents | 9497f58484a0 |
children | 68f01f10624e |
comparison
equal
deleted
inserted
replaced
542:9497f58484a0 | 543:e9abf747f6ce |
---|---|
11 | 11 |
12 collection.items.artifact.id=SELECT artifact_id FROM collection_items | 12 collection.items.artifact.id=SELECT artifact_id FROM collection_items |
13 | 13 |
14 artifacts.outdated=SELECT id, factory, data, gid FROM artifacts WHERE ttl IS NOT NULL \ | 14 artifacts.outdated=SELECT id, factory, data, gid FROM artifacts WHERE ttl IS NOT NULL \ |
15 AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl \ | 15 AND DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) > ttl \ |
16 AND id NOT IN ($LOCKED_IDS$) \ | 16 AND id NOT IN ($LOCKED_IDS$) |
17 LIMIT 50 | |
18 | 17 |
19 artifacts.select.gid=SELECT id, ttl, factory, data FROM artifacts WHERE gid = ?::uuid \ | 18 artifacts.select.gid=SELECT id, ttl, factory, data FROM artifacts WHERE gid = ?::uuid \ |
20 AND (ttl IS NULL \ | 19 AND (ttl IS NULL \ |
21 OR (DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) <= ttl) \ | 20 OR (DATEDIFF('MILLISECOND', last_access, CURRENT_TIMESTAMP) <= ttl) \ |
22 OR id IN (SELECT artifact_id FROM collection_items)) | 21 OR id IN (SELECT artifact_id FROM collection_items)) |