-
Notifications
You must be signed in to change notification settings - Fork 38
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
feat: implement new options into bwrite command #190
Conversation
/snapshot |
Start taking snapshots for this pull request. |
/snapshot |
Start taking snapshots for this pull request. |
e00dec6
to
77cfba3
Compare
f1a1076
to
91c2e2e
Compare
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.
Thank you for implementing a great PR. I left comments. Could you check them? I'm not sure of the reason for CI failure currently. But I think redundant tm
creation may be a cause.
b96b296
to
eb67542
Compare
Thank you for the thorough review of this PR. I pushed the changes based on your comment. |
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.
Thank you for updating the PR. Could you please check the comments I left?
README.md
Outdated
``` | ||
|
||
```bash | ||
$ dy bwrite --del '{"pk": "1"}' --del '{"pk": "2"}' --put '{"pk": "3", "this_is_set": <<"a","b","c">>}' --input request.json |
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.
nit: There are two spaces before --input
.
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.
Fixed.
README.md
Outdated
2 {"this_is_set":["x","y","z"]} | ||
``` | ||
|
||
The --put, --del, and --input options can be used simultaneously. |
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.
nit: Forget to quote backticks.
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.
Fixed.
src/batch.rs
Outdated
@@ -501,3 +570,68 @@ fn json_binary_val_to_bytes(v: &JsonValue) -> Bytes { | |||
.expect("binary inputs should be base64 with padding encoded"), | |||
) | |||
} | |||
|
|||
// Check if the item has a partition key and sort key. | |||
fn validate_item_has_keys( |
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 method also checks key types. We need to change the name of this method to reflect actual work. For instance, validate_item_keys
makes sense to me.
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.
Fixed.
498d40a
to
0514bee
Compare
0514bee
to
d52a666
Compare
Signed-off-by: Tomoya Oda <[email protected]>
Signed-off-by: Tomoya Oda <[email protected]>
Signed-off-by: Tomoya Oda <[email protected]>
Signed-off-by: Tomoya Oda <[email protected]>
d52a666
to
5b17141
Compare
Thanks for the insightful review. I've fixed the points based on your comment and squashed the fixup commits. |
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 am expressing my sincere appreciation for your continuous efforts to enhance the code quality. The improvements you've made are truly remarkable. LGTM, and I will proudly merge your work.
feat: implement new options into bwrite command --------- Signed-off-by: Tomoya Oda <[email protected]>
Issue #, if available:
#164
Description of changes:
Introduce new options into put command. This commit adds new command options,
--put
and--del
.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.