Skip to content

Commit

Permalink
Support ieq null
Browse files Browse the repository at this point in the history
  • Loading branch information
myieye committed Apr 4, 2024
1 parent 86c914b commit dc3745a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ public override Expression HandleOperation(
IValueNode value,
object? searchObject)
{
Expression property = context.GetInstance();

if (searchObject is null)
return Expression.Equal(property, Expression.Constant(null));

if (searchObject is not string search)
throw new InvalidOperationException($"Expected {nameof(QueryableStringDeterministicInvariantEqualsHandler)} to be called with a string, but was {searchObject}.");

var escapedString = EscapeLikePatternRegex.Replace(search, @"\$1");
var pattern = escapedString;
var property = context.GetInstance();

var collatedValueExpression = Expression.Call(
null,
Expand Down

0 comments on commit dc3745a

Please sign in to comment.