-
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
Support dot notation with $pop update operation #193
Conversation
@@ -1347,6 +1413,8 @@ private void insertDoc(String docJson) { | |||
.when() | |||
.post(CollectionResource.BASE_PATH, keyspaceId.asInternal(), collectionName) | |||
.then() | |||
// Sanity check: let's look for non-empty inserted id |
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.
Needed because we always get 200 response; failure indicated differently so need to get inserted-id.
(not checking masked a few failures within invalid json being sent)
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
|
||
// Otherwise must be an array | ||
if (value.isArray()) { // Already array? To modify unless empty | ||
if (!value.isEmpty()) { |
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.
Interesting we have handled empty array. I just tested it with insert and find, it works!
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.
Ok good -- I thought it should but is good to confirm. Mongo array operators are pretty useful.
What this PR does:
Changes
$pop
implementation to support dotted paths too.Which issue(s) this PR fixes:
Fixes #184
Checklist