-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
When we want to filter some string fields we would like to specify on BE when we call
queryOptions.Filter.ApplyTo option to ignore case-sensitivity of values so that with
word eq dog we can match records Dog, dog, DoG
It would probably make sense to specify this as a part of ApplyTo or in ODataQueryOptions that is used for filter's ApplyTo
Related discussions:
- Can i filter with case insensitive #633
- Remove case sensitivity from Filter for Odata #762
- https://learn.microsoft.com/en-us/answers/questions/1274766/is-filter-eq-case-sensitive-or-not
Are there any reasons this is not yet implemented?
Workoarounds:
- in the query use
toLowerortoUpper. E.g.?$filter=tolower(Name) eq 'john'?$filter=contains(tolower(Name),'john')
- in EF using a case-insensitive collation (ends with CI... on SQL Server, or NOCASE on SQLite)
Metadata
Metadata
Assignees
Labels
No labels