Skip to content
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 batch_delete #157

Merged
merged 8 commits into from Sep 21, 2021
Merged

Conversation

magurotuna
Copy link
Collaborator

What does this change?

This PR does the following:

  1. implement batch_delete feature and add tests for it
  2. make all types used in derive macro absolute path (like ConditionFilledOrWaitConjunction to ::raiden::ConditionFilledOrWaitConjunction)
  3. import IntoAttribute, IntoAttrName, and DynamoDb trait at the beginning of the macro expansion

2 and 3 will allow us to derive Raiden macro without having to import other items from raiden. In other words, all we will need to import to derive is just raiden::Raiden.

What can I check for bug fixes?

I added test cases to confirm batch_delete works for basic usecases.

@magurotuna magurotuna changed the title feature: implement batch_delete feat: implement batch_delete Sep 19, 2021
Comment on lines +107 to +108
const RETRY: usize = 5;
const MAX_ITEMS_PER_REQUEST: usize = 25;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, the limit of the number of items per request is taken into account, but the limit of whole data of a request (16MB) is not. Ideally this also should be taken into account but I think it's ok for the moment, because it seems to be very rare that the data size of 25 items exceeds 16MB in total.

Copy link
Member

@bokuweb bokuweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good :)

Comment on lines +137 to +139
use ::raiden::IntoAttribute as _;
use ::raiden::IntoAttrName as _;
use ::raiden::DynamoDb as _;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bokuweb bokuweb merged commit 3496922 into raiden-rs:master Sep 21, 2021
@magurotuna magurotuna deleted the batch-delete branch September 27, 2021 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants