-
Notifications
You must be signed in to change notification settings - Fork 124
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 write and mWrite #1302
Add write and mWrite #1302
Conversation
@Aschen > wouldn't the What do you think? |
@scottinet Yes I agree, it's more logical to put this kind of low-level operation together! I also agree for the notifications, I needed them for my usecase but again since these are low-level method It's better to let the developer choose what he want to do. |
Codecov Report
@@ Coverage Diff @@
## 1-dev #1302 +/- ##
==========================================
- Coverage 93.84% 93.46% -0.39%
==========================================
Files 98 98
Lines 6857 6885 +28
==========================================
Hits 6435 6435
- Misses 422 450 +28
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## 1-dev #1302 +/- ##
==========================================
- Coverage 93.85% 93.69% -0.16%
==========================================
Files 98 98
Lines 6895 6934 +39
==========================================
+ Hits 6471 6497 +26
- Misses 424 437 +13
Continue to review full report at Codecov.
|
@scottinet @thomasarbona @Yoann-Abbes @alexandrebouthinon You might want to review this PR, I added the tests |
} | ||
|
||
return Boolean(flagValue); |
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 is not ensureBooleanFlag
anymore, since you're now retrieving the value
another name must now be found, for instance tryGetBoolean
?
also, the jsdoc is now outdated
Co-Authored-By: Sébastien Cottinet <[email protected]>
## What does this PR do? Documents bulk:write and bulk:mWrite. See kuzzleio/kuzzle#1302 ### How should this be manually tested? - Step 1 : - Step 2 : - Step 3 : ... ### Other changes Add references to these methods in data validation, kuzzle metadata and real-time guides
Release 1.8.0 Bug fixes [ #1311 ] Fix promise leaks (scottinet) [ #1298 ] Fix disabled protocol initialization (Aschen) [ #1297 ] Fix timeouts on plugin action returing the request (benoitvidis) [ #1288 ] Fix an error when trying a non-partial bulk update (scottinet) [ #1286 ] Allows bulk inserts on aliases (benoitvidis) [ #1282 ] Scan keys on redis cluster (benoitvidis) [ #1279 ] Users must be authenticated to use auth:logout (scottinet) New features [ #1315 ] Add the new Vault module to handle encrypted application secrets (Aschen) [ #1302 ] Add write and mWrite (Aschen) [ #1305 ] Add pipes & hooks wildcard event (thomasarbona) Enhancements [ #1318 ] Add a maximum ttl to auth:login (benoitvidis) [ #1301 ] Upgrade the WebSocket libraries (scottinet) [ #1308 ] Events triggering refactor (scottinet) [ #1300 ] Collection specifications methods cloisoned to a collection (thomasarbona) [ #1295 ] Improve validation error messages (benoitvidis) [ #1292 ] Throw an error when the realtime controller is invoked by plugin developers (benoitvidis) [ #1257 ] Add ability to define mapping policy for new fields (Aschen) [ #1291 ] Fix --help on subcommands (Yoann-Abbes) [ #1289 ] Handle ping/pong packets (scottinet) [ #1273 ] Fix incomplete access logs (scottinet) Others [ #1317 ] Add ps dependency to plugin-dev Docker image for pm2 (benoitvidis) [ #1312 ] Check that .kuzzlerc.sample is well-formed (scottinet) [ #1299 ] Add Kuzzle Nightly & Redis 3 and 4 test (alexandrebouthinon)
What does this PR do ?
(Open discussion)
This PR add two method for the bulk controller that behave like
createOrReplace
andmCreateOrReplace
:write
: write a document without adding metadata or performing data validationmWrite
: write several documents without adding metadata or performing data validationThe name is open to debate, I have thought of
put
andmPut
alsoThe goal is to have a low level method that allow to arbitrary write document into the storage layer to bypass automatic metadata or the data validation layer.
It's better to have these two endpoints than an option like
bypassMeta
on existing methods because developer can choose to not expose these methods to users.How should this be manually tested?
...
Other changes