From 30e0ef39499da4baccb34def3c754605a5e9f47b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 27 Feb 2020 18:57:42 +0000 Subject: [PATCH] --- .../DataList/DataListSqlFilterCriteriaBuilder.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs b/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs index 200ce169..1f9d637f 100644 --- a/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs +++ b/server/AyaNova/DataList/DataListSqlFilterCriteriaBuilder.cs @@ -38,9 +38,10 @@ namespace AyaNova.DataList var fld = cm["fld"].Value(); var dataType = objectFieldsList.Find(x => x.FieldKey.ToLowerInvariant() == fld).UiFieldDataType; AyaDataListFieldDefinition DataListField = objectFieldsList.FirstOrDefault(x => x.FieldKey == fld); - + //No filtering on custom fields! - if(DataListField.IsCustomField){ + if (DataListField.IsCustomField) + { continue; } #if (DEBUG) @@ -125,7 +126,7 @@ namespace AyaNova.DataList ThisIsTheFirstFilterItemForThisColumn = false; } - + if (ThereAreMultipleFilterItems) { //The whole thing was in a group so close this group @@ -146,7 +147,7 @@ namespace AyaNova.DataList sb.Append("("); sb.Append(ColumnWhereClauses[i]); sb.Append(")"); - if (i < ColumnWhereClauses.Count-1) + if (i < ColumnWhereClauses.Count - 1) { sb.Append(" AND "); } @@ -523,6 +524,9 @@ namespace AyaNova.DataList case UiFieldDataType.Tags: { //Build tags filter fragment + + //NOTE: tag filter OPERATOR is ignored, query matches if all tags are found in a tag collection that could have other tags as well + //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) //select * from awidget where awidget.tags @> array['blah','blah3'::varchar(255)]