This commit is contained in:
2021-09-10 17:35:26 +00:00
parent caf0f3071d
commit adda80c05b
11 changed files with 32 additions and 43 deletions

View File

@@ -149,7 +149,7 @@ namespace AyaNova.PickList
//all the other templated fields
if (HasAutoCompleteQuery && !HasTagSpecificQuery)
{
if (ServerGlobalBizSettings.Cache.SearchCaseSensitiveOnly)
if (ServerGlobalBizSettings.Cache.FilterCaseSensitive)
sWhere = $"(array_to_string({valueColumnName},',') like '%{autoCompleteQuery}%')";
else
sWhere = $"(lower(array_to_string({valueColumnName},',')) like lower('%{autoCompleteQuery}%'))";
@@ -164,7 +164,7 @@ namespace AyaNova.PickList
lSelect.Add(valueColumnName);
lOrderBy.Add(valueColumnName);
if (HasAutoCompleteQuery)
if (ServerGlobalBizSettings.Cache.SearchCaseSensitiveOnly)
if (ServerGlobalBizSettings.Cache.FilterCaseSensitive)
sWhere = $"({valueColumnName} like '%{autoCompleteQuery}%')";
else
sWhere = $"(lower({valueColumnName}) like lower('%{autoCompleteQuery}%'))";
@@ -186,7 +186,7 @@ namespace AyaNova.PickList
//Where fragment is different for non text fields: it needs to be cast to text to like query on it
//(cast (aworkorder.serial as text) like '%some%')
if (HasAutoCompleteQuery)
if (ServerGlobalBizSettings.Cache.SearchCaseSensitiveOnly)
if (ServerGlobalBizSettings.Cache.FilterCaseSensitive)
sWhere = $"(cast ({valueColumnName} as text) like '%{autoCompleteQuery}%')";
else
sWhere = $"(lower(cast ({valueColumnName} as text)) like lower('%{autoCompleteQuery}%'))";