-
Notifications
You must be signed in to change notification settings - Fork 83
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
$not operator does not handle non-array values correctly. #146
Comments
Thanks and I appreciate you considering this library. On the issue itself, the The documentation does say the value for the expression when used in an aggregation context must be Nonetheless given the inconsistency it is fair to treat this a bug. The documentation alone does not constitute a spec of any kind. |
Awesome, thanks for the clarification! I'll leave this issue open to leave a record of the bug. |
MongoDB accepts either a plain value or array with single element as per the documentation.
I'd like to start by saying that your library looks awesome!
I'm considering making mingo the MongoDB query engine for MSON as it implements aggregation, a very needed concept that is currently missing.
My hold up is that in my quick tests, it looks like there may be a problem with basic operators like
$not
. For example, take a look at this codsandbox and you'll see that the output ofbar
istrue
and not the negation offoo
. In other words, shouldn'tbar
=false
?For convenience, here is the code:
By comparison, this is how MongoDB handles this same aggregation. Please note that the Result has
bar
=false
Configuration:
Query:
Result:
The text was updated successfully, but these errors were encountered: