-
-
Notifications
You must be signed in to change notification settings - Fork 18
Closed
Description
while integrating the library I faced an issue when I try to use contains with nullable string field
example :
public class Person {
public string Name {get; set;}
public string Email {get; set;}
}
var filter1 = """ Email @=* "gmail" """;
var filter2 = """ Email ==* "gmail" """;
var input = new List<Person>(){ new (){ Email = null; } }
// input.ApplyQueryKitFilter(filter1) => throws exception
// input.ApplyQueryKitFilter(filter2) => works
I believe the issue happens after building and excuting the filter experssion , the first filter results :
x.Email.ToLower().Contains(...)
Expected behavior
@=* should safely handle nullable strings and behave similarly to:
x.Email != null && x.Email.ToLower().Contains("gmail")
or simply treat null values as non-matching, without throwing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels