-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add $size #354
Add $size #354
Conversation
Ready for follow-up review @maheshrajamani. Thanks! |
|
||
```json5 | ||
db.collection.find( { field: { $size: 2 } } ); |
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.
This isn't valid JSON. I think this should be { "field": { "$size": 2 } }
#### $elemMatch operation | ||
|
||
TODO: | ||
That expression returns, e.g.: `{ field: [ red, green ] }` and `{ field: [ apple, lime ] }`, but not `{ field: fruit }` or `{ field: [ orange, lemon, grapefruit ] }`. |
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.
Quotes around "field" and string values, so { "field": ["red", "green"] }
. We should use valid JSON where possible for consistency and so code samples are easier to copy/paste.
What this PR does:
Which issue(s) this PR fixes:
Fixes #
Checklist