jirutka/rsql-parser

support for NOT operator

kamaydeo opened this issue · 4 comments

As far as I know, AND and OR are supported. Logical NOT operator support will be useful as well.

Could you please provide me some read-world example where it would be actually useful?

userType!=Employee and not (email=="*example.com*" or emails=="*example.org*" and salary < 100000)

It could be done using AND and OR combination but in some case NOT is more expressive.

+1 I agree this should be supported, the intention is more straightforward

+1 It's also useful for when you've generated a query dynamically and simply want to invert it based on your required logic rather than having to factor the not through. I've had to work around it myself.