-
Notifications
You must be signed in to change notification settings - Fork 17
Add document:updateByQuery #519
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
Conversation
Codecov Report
@@ Coverage Diff @@
## 7-dev #519 +/- ##
========================================
Coverage ? 95.64%
========================================
Files ? 32
Lines ? 1308
Branches ? 0
========================================
Hits ? 1251
Misses ? 57
Partials ? 0
Continue to review full report at Codecov.
|
[snippet-code] finally { | ||
kuzzle.disconnect(); | ||
} | ||
for (const elem of result.successes) { |
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 will only works with arrays returned by some of the m*
methods. For example it wont works with document:search or document:mDelete.
You don't need to use this template also, you can just print the content of the result in JSON with newlines
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.
I think this template could be useful, so I just renamed it print-result-successes
as it do exactly that. So no confusion for route that wont return a successes
array.
src/controllers/Document.js
Outdated
const request = { | ||
index, | ||
collection, | ||
body: {...searchQuery, ...changes}, |
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 should not work because every properties is at the same level instead of being inside the searchQuery
and changes
properties
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.
I meant request change
doc/7/controllers/document/update-by-query/snippets/update-by-query.js
Outdated
Show resolved
Hide resolved
# [7.3.0](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.3.0) (2020-07-23) #### Bug fixes - [ [#532](#532) ] Encode URI parameters when using the HTTTP protocol ([scottinet](https://github.com/scottinet)) - [ [#516](#516) ] Fix query string construction ([Yoann-Abbes](https://github.com/Yoann-Abbes)) #### New features - [ [#526](#526) ] Add typescript definitions for Auth controller ([Aschen](https://github.com/Aschen)) - [ [#524](#524) ] Support ms:mexecute ([Leodau](https://github.com/Leodau)) - [ [#522](#522) ] Add bulk:deleteByQuery ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#519](#519) ] Add document:updateByQuery ([Yoann-Abbes](https://github.com/Yoann-Abbes)) #### Enhancements - [ [#517](#517) ] Add collection:update and deprecate collection:updateMapping ([Yoann-Abbes](https://github.com/Yoann-Abbes)) - [ [#514](#514) ] Able to execute document search as GET http method ([Yoann-Abbes](https://github.com/Yoann-Abbes)) ---
What does this PR do?
This PR adds
document:updateByQuery
to the sdkIssue #518
How should this be manually tested?
...
Other changes
Adds a new snippet template
print-result-array.tpl.js