-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding IsNull, IsNotNull, IsEmpty, IsNotEmpty filters. #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job ✨🚀, thanks
I've just wanted some formatting changes to keep consistency in the project
return Expression.Equal( Expression.Property(expressionBody, targetProperty.Name), Expression.Constant(null)); | ||
case OperatorType.IsNotNull: | ||
return Expression.NotEqual( Expression.Property(expressionBody, targetProperty.Name), Expression.Constant(null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return Expression.Equal( Expression.Property(expressionBody, targetProperty.Name), Expression.Constant(null)); | |
case OperatorType.IsNotNull: | |
return Expression.NotEqual( Expression.Property(expressionBody, targetProperty.Name), Expression.Constant(null)); | |
return Expression.Equal(Expression.Property(expressionBody, targetProperty.Name), Expression.Constant(null)); | |
case OperatorType.IsNotNull: | |
return Expression.NotEqual(Expression.Property(expressionBody, targetProperty.Name), Expression.Constant(null)); |
public static OperatorComparisonAttribute LessThanOrEqual { get; } | ||
|
||
public static OperatorComparisonAttribute IsNull { get; } | ||
|
||
public static OperatorComparisonAttribute IsNotNull { get; } | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public static OperatorComparisonAttribute LessThanOrEqual { get; } | |
public static OperatorComparisonAttribute IsNull { get; } | |
public static OperatorComparisonAttribute IsNotNull { get; } | |
public static OperatorComparisonAttribute LessThanOrEqual { get; } | |
public static OperatorComparisonAttribute IsNull { get; } | |
public static OperatorComparisonAttribute IsNotNull { get; } | |
Also, some of the tests are failing currently Can you please update the following test according to the new logic? AutoFilterer/tests/AutoFilterer.Tests/Types/OperatorQueryTests.cs Lines 36 to 56 in e47ce55
|
Not-Nullable types getting error. Adding the type is nullable check binary expressions. |
I've just referenced the issue which is found by CodeFactor It's ok to merge now. I'll refactor it later. Using if chains is not a good solution, but it's ok for now. |
No description provided.