Skip to content
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

Merged
merged 9 commits into from
Apr 14, 2023
Merged

Add $size #354

merged 9 commits into from
Apr 14, 2023

Conversation

johnsmartco
Copy link
Contributor

What this PR does:

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@johnsmartco johnsmartco requested a review from a team as a code owner April 14, 2023 14:06
@johnsmartco johnsmartco self-assigned this Apr 14, 2023
@johnsmartco johnsmartco added this to the Ready for Review milestone Apr 14, 2023
@johnsmartco
Copy link
Contributor Author

Ready for follow-up review @maheshrajamani. Thanks!

docs/jsonapi-spec.md Outdated Show resolved Hide resolved
@johnsmartco johnsmartco merged commit 521b21f into main Apr 14, 2023
@johnsmartco johnsmartco deleted the c2-2459 branch April 14, 2023 14:56

```json5
db.collection.find( { field: { $size: 2 } } );
Copy link
Collaborator

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 ] }`.
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants