-
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 support for $each
modifier of $push
update operator
#99
Conversation
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.
LGTM so far, just one test suggestion
UpdateOperator.PUSH.resolveOperation( | ||
objectFromJson( | ||
""" | ||
{ "array" : { "$each" : 365 } } |
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.
Another good case to test would be using $each
to push an array. For example, $push: { $each: [[-80, 25], [-121, 37]] }
should push 2 array elements.
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.
@vkarpov15 Thanks! Yes, good idea, will add.
$each
modifier of $push
update operator$each
modifier of $push
update operator
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.
Nice, thanks 👍
With #72 basic
$push
operation was added but it did not support modifiers. The most important one to add (plus one required to support any of the others) is$each
; this PR adds support.