KendoNET.DynamicLinq icon indicating copy to clipboard operation
KendoNET.DynamicLinq copied to clipboard

Support for case insensitive filtering for string

Open ishit-parikh-hs opened this issue 4 years ago • 3 comments

Added a boolean param in Filter to support case-insensitive filter for strings and operators - StartsWith, EndsWith, Contains and Doesnotcontain

ishit-parikh-hs avatar Oct 19 '21 10:10 ishit-parikh-hs

support for this #15

yogen-darji-hs avatar Oct 19 '21 12:10 yogen-darji-hs

Property name changed to Pascal case

ishit-parikh-hs avatar Oct 20 '21 11:10 ishit-parikh-hs

By the way, I found some references that indicated the case sensitivity depends on the database provider. For example, SQLite and PostgreSQL are case-sensitive by default, others like SQL Server and MySQL are case-insensitive. On the other hand, Use string.ToLower might cause a performance issue.

Overriding case sensitivity in a query via EF.Functions.Collate (or by calling string.ToLower) can have a very significant impact on your application's performance.

References:

  1. toODataString returns an invalid string when using case insensitive search
  2. Entity Framework Core - Contains is case sensitive or case insensitive
  3. Collations and Case Sensitivity

linmasaki avatar Oct 31 '21 12:10 linmasaki