This commit is contained in:
2021-09-02 18:24:39 +00:00
parent 4bea1f1ec6
commit d066e67082

View File

@@ -1630,9 +1630,14 @@ namespace AyaNova.DataList
Current equalto filter doesn't work with this type of query as it directly compares it as if it was one string instead of does it contain all those terms
### HOW IT SHOULD WORK ###
Equality: Exactly equal (aside from order) compare entire search term array to tag array in db - all terms in search exactly present and no others in db record
contains and also length is same as search terms length, in this example 1 is the number of search terms as the search is for {'green'}
WHERE ARRAY['green'::varchar(255)] <@ tags and array_length(tags,1) = 1
Not equal: Not EXACTLY Equal (aside from order) All terms in search term array NOT present in All terms in db record. IOW if db record has all search terms but also one more tag then it's NOT equal, Order doesn't matter
WHERE NOT (ARRAY['green'::varchar(255)] <@ tags and array_length(tags,1) = 1)
NO value: Empty tag array in db record
db record tags has NO value
where tags = '{}'