This commit is contained in:
2020-03-13 21:51:12 +00:00
parent 84dbf06991
commit 1a63d43483
2 changed files with 7 additions and 1 deletions

View File

@@ -530,6 +530,12 @@ namespace AyaNova.DataList
//for initial release a tag filter is inclusive of all tags only //for initial release a tag filter is inclusive of all tags only
//in other words all tags presented must be in record to match (simple AND) //in other words all tags presented must be in record to match (simple AND)
//select * from awidget where awidget.tags @> array['blah','blah3'::varchar(255)] //select * from awidget where awidget.tags @> array['blah','blah3'::varchar(255)]
//NOTE: After coding this discovered *can* do a LIKE query with tags like this:
//(array_to_string(awidget.tags,',') like '%zo%')
//implemented that way in picklistquery builder
//also ilike is a postgres case insensitive like but works on current locale of server which
//sounds like it might fuck up when using other languages so...
StringBuilder sbTags = new StringBuilder(); StringBuilder sbTags = new StringBuilder();
sbTags.Append("@> array["); sbTags.Append("@> array[");
List<string> normalizedTags = TagUtil.NormalizeTags(sTags); List<string> normalizedTags = TagUtil.NormalizeTags(sTags);