Support for NOT LIKE
Hi, I'm wondering why NOT LIKE was not implemented along with LIKE.
It appears to me that CompareNotLikeFunction could exist, just like there's CompareNotEqualsFunction. And that ConditionParser could recognize !~.
I'm sure though, you must have had a reason for not implementing it, so I'm just curious what it was.
Thank you.
I'm sure though, you must have had a reason for not implementing it, so I'm just curious what it was.
No reason, pure omission.
Practically, it is possible to easily work around by introducing your own function Not() that will negate.
Practically, it is possible to easily work around by introducing your own function Not() that will negate.
Interesting approach!
Or maybe ICollection::NOT and NotOperatorFunction would also work.
Anyway, I would prefer using the !~ syntax, and have ConditionParser recognize it. I guess even in that case a NotFunction could be used, and applied in place of CompareNotEqualsFunction.
Would you be interested in a pull request that implements the NotFunction with changes to ConditionParser?
I welcome opening PR with LikeExpression::MODE_NOT_CONTAINS. Adding another mode for RAW does not make much sense.
I welcome opening PR with NotFunction.