You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataSourceLoadOptionsBase - provide option to skip StringToLower for specific fields #492
Hello,
is possible to implement new DataSourceLoadOptionsBase.SkipStringToLower option.
When I have some filter, I need case insensitive comparison just for some fields, but not for others (because of index search).
SELECTCOUNT(*)
FROM [Orders] AS [o]
WHERE ([o].[ShipName] = N'Wilman Kala') AND (CHARINDEX(N'Keskuskatu 45', [o].[ShipAddress]) >0)
Compare with SQL w/o SkipStringToLowerCompiler:
SELECTCOUNT(*)
FROM [Orders] AS [o]
WHERE (LOWER([o].[ShipName]) = N'wilman kala') AND (CHARINDEX(N'keskuskatu 45', LOWER([o].[ShipAddress])) >0)
However, as you probably know, in SQL databases, case sensitivity is often controlled by table/column collation settings. If this is your case then you don't need to use StringToLower.
Activity
AlekseyMartynov commentedon Sep 28, 2021
Hello
You can use
CustomFilterCompilersto intercept and modify filter expressions.Example:
Resulting SQL:
Compare with SQL w/o
SkipStringToLowerCompiler:However, as you probably know, in SQL databases, case sensitivity is often controlled by table/column collation settings. If this is your case then you don't need to use
StringToLower.drekoo commentedon Sep 28, 2021
Ok, thank you very much for workaround.