This commit is contained in:
2021-06-15 17:21:28 +00:00
parent 53e4a9c75e
commit 05d697485e
7 changed files with 36 additions and 56 deletions

View File

@@ -156,7 +156,7 @@ namespace AyaNova.PickList
//all the other templated fields
if (HasAutoCompleteQuery && !HasTagSpecificQuery)
{
if (ServerGlobalBizSettings.SearchCaseSensitiveOnly)
if (ServerGlobalBizSettings.Cache.SearchCaseSensitiveOnly)
sWhere = $"(array_to_string({valueColumnName},',') like '%{autoCompleteQuery}%')";
else
sWhere = $"(lower(array_to_string({valueColumnName},',')) like lower('%{autoCompleteQuery}%'))";
@@ -171,7 +171,7 @@ namespace AyaNova.PickList
lSelect.Add(valueColumnName);
lOrderBy.Add(valueColumnName);
if (HasAutoCompleteQuery)
if (ServerGlobalBizSettings.SearchCaseSensitiveOnly)
if (ServerGlobalBizSettings.Cache.SearchCaseSensitiveOnly)
sWhere = $"({valueColumnName} like '%{autoCompleteQuery}%')";
else
sWhere = $"(lower({valueColumnName}) like lower('%{autoCompleteQuery}%'))";
@@ -193,7 +193,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 (awidget.serial as text) like '%some%')
if (HasAutoCompleteQuery)
if (ServerGlobalBizSettings.SearchCaseSensitiveOnly)
if (ServerGlobalBizSettings.Cache.SearchCaseSensitiveOnly)
sWhere = $"(cast ({valueColumnName} as text) like '%{autoCompleteQuery}%')";
else
sWhere = $"(lower(cast ({valueColumnName} as text)) like lower('%{autoCompleteQuery}%'))";