summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/tags.ur5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/tags.ur b/tests/tags.ur
index 1213d824..059e869a 100644
--- a/tests/tags.ur
+++ b/tests/tags.ur
@@ -11,7 +11,10 @@ fun addCondition (c : condition) (q : tag_query) : tag_query =
Present => (SELECT I.Id AS Id
FROM ({{q}}) AS I
JOIN tags ON tags.Id = I.Id AND tags.Tag = {[c.Tag]})
- | Absent => q
+ | Absent => (SELECT I.Id AS Id
+ FROM ({{q}}) AS I
+ LEFT JOIN tags ON tags.Id = I.Id AND tags.Tag = {[c.Tag]}
+ WHERE tags.Tag IS NULL)
fun withConditions (cs : list condition) : tag_query =
List.foldl addCondition (SELECT images.Id AS Id FROM images) cs