This commit is contained in:
@@ -151,7 +151,7 @@ namespace AyaNova.DataList
|
||||
|
||||
bool ForceToLower = false;
|
||||
//Force to LOWER case if it's a text data type and filter case sensitive is false
|
||||
if (ServerGlobalBizSettings.Cache.FilterCaseSensitive)
|
||||
if (!ServerGlobalBizSettings.Cache.FilterCaseSensitive)
|
||||
{
|
||||
switch (DataType)
|
||||
{
|
||||
@@ -169,27 +169,16 @@ namespace AyaNova.DataList
|
||||
//Handle nulls and also insert the column name into the query in case sensitive fashion
|
||||
switch (sOperator)
|
||||
{
|
||||
case DataListFilterComparisonOperator.Equality:
|
||||
//no specific addition on equals for nulls, just column name for below
|
||||
if (ForceToLower)
|
||||
sb.Append($"lower('{SqlColumnNameToFilter}') ");
|
||||
else
|
||||
sb.Append($"{SqlColumnNameToFilter} ");
|
||||
break;
|
||||
case DataListFilterComparisonOperator.GreaterThan:
|
||||
//case DataListFilterComparisonOperator.Equality: //no specific addition on equals for nulls, let default handle it
|
||||
//case DataListFilterComparisonOperator.GreaterThan:
|
||||
//no specific addition on greater than for nulls
|
||||
//(nulls are going to be assumed to be always at the
|
||||
//less than end of the scale) so just include column name
|
||||
break;
|
||||
case DataListFilterComparisonOperator.GreaterThanOrEqualTo:
|
||||
//less than end of the scale) so let default handle it
|
||||
//case DataListFilterComparisonOperator.GreaterThanOrEqualTo:
|
||||
//no change on greater than for nulls
|
||||
//(nulls are going to be assumed to be always at the
|
||||
//less than end of the scale)
|
||||
if (ForceToLower)
|
||||
sb.Append($"lower('{SqlColumnNameToFilter}') ");
|
||||
else
|
||||
sb.Append($"{SqlColumnNameToFilter} ");
|
||||
break;
|
||||
//less than end of the scale) let default case handle it
|
||||
|
||||
case DataListFilterComparisonOperator.LessThan:
|
||||
sb.Append($"{SqlColumnNameToFilter} ");
|
||||
sb.Append("Is Null OR ");
|
||||
@@ -218,6 +207,12 @@ namespace AyaNova.DataList
|
||||
sb.Append(SqlColumnNameToFilter);
|
||||
sb.Append(" ");
|
||||
break;
|
||||
default:
|
||||
if (ForceToLower)
|
||||
sb.Append($"lower('{SqlColumnNameToFilter}') ");
|
||||
else
|
||||
sb.Append($"{SqlColumnNameToFilter} ");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user