-
Notifications
You must be signed in to change notification settings - Fork 156
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
jsonQueryParser inaccurate parse value in JSON when value[0] is '!','<','>'... #285
Comments
This behavior is documented, though I do agree that there should at least be a way to turn it off. As a side note, I see that you're using v0.7 or v1.x, which are unlikely to be patched. |
v1.1.1 |
It's not a good way use JSON key-value of value to parse operators. Operators must be a key in JSON key-value. |
Like I said, I agree. We can't just remove it though because it's a breaking change, it would have to be behind an option. You're welcome to submit a PR :) |
ok, thanks . :) |
I'm not sure how useful this is so it could probably be removed for 5.0 and @johnzhou2011 raised a good point, running a query like @florianholzapfel Thoughts? |
actually it should be possible by explicitly specifying the operator. e.g. to query for |
The jsonQueryParser should parser the key not value[0]
eg:
{messageId: "70666280047D7CD@front04.ibpmail.net\>A(addedAbyApostmaster@ibpmail.com)"}
will convert to
Mongoose: emails.find({"messageId":{"$lt":"570666280047D7CD@front04.ibpmail.net>A(addedAbyApostmaster@ibpmail.com)"}})
not
Mongoose: emails.find({"messageId": "<570666280047D7CD@front04.ibpmail.net>A(addedAbyApostmaster@ibpmail.com)"})
We need recursive parse keys to operators , currently jsonQueryParser is needless, all JSON should accrate to provide operators such as "$lt" as a key in JSON string.
The text was updated successfully, but these errors were encountered: