Support for case insensitive filtering for string#19
Support for case insensitive filtering for string#19ishit-parikh-hs wants to merge 3 commits intolinmasaki:masterfrom
Conversation
…r strings and operators - StartsWith, EndsWith, Contains and Doesnotcontain
|
support for this #15 |
src/Filter.cs
Outdated
| /// Gets or sets the filtering logic. Can be set to "or" or "and". Set to null unless Filters is set. | ||
| /// </summary> | ||
| [DataMember(Name = "ignoreCase")] | ||
| public bool ignoreCase { get; set; } |
There was a problem hiding this comment.
Why not use Pascal Case?
Thanks for finding out, missed to make it Pascal in hurry. Committing after correction.
|
Property name changed to Pascal case |
| public string Logic { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the filtering logic. Can be set to "or" or "and". Set to null unless Filters is set. |
There was a problem hiding this comment.
This summary is required to adjust.
| Weight = 69.2, | ||
| Gender = Gender.M, | ||
| Birthday = new DateTime(1986,10,10), | ||
| Birthday = new DateTime(1986, 10, 9, 16, 0, 0), |
There was a problem hiding this comment.
Could you explain the reason for changing this test data value?
| Weight = 82.1, | ||
| Gender = Gender.M, | ||
| Birthday = new DateTime(1976,11,6), | ||
| Birthday = new DateTime(1976, 11, 5, 16, 0, 0), |
| } | ||
|
|
||
| [Test] | ||
| public void InputParameter_SubPropertyContains_Case_Insensitive_CheckResultCount() |
There was a problem hiding this comment.
Could you provide a sample of JSON string(with ignoreCase property) that request in a real scenario?
|
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.
References: |
Added a boolean param in Filter to support case-insensitive filter for strings and operators - StartsWith, EndsWith, Contains and Doesnotcontain