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

Add delete_many to support for bulk deletes #305

Merged
merged 13 commits into from
Aug 10, 2022
Merged

Add delete_many to support for bulk deletes #305

merged 13 commits into from
Aug 10, 2022

Conversation

dvora-h
Copy link
Contributor

@dvora-h dvora-h commented Jul 12, 2022

No description provided.

@dvora-h dvora-h added the enhancement New feature or request label Jul 12, 2022
simonprickett
simonprickett previously approved these changes Jul 18, 2022
Copy link
Contributor

@simonprickett simonprickett left a comment

Choose a reason for hiding this comment

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

@dvora-h looks good to me.

@@ -1115,9 +1115,13 @@ def key(self):
return self.make_primary_key(pk)

@classmethod
async def delete(cls, pk: Any) -> int:
async def delete(cls, pk: Any, pipeline: Optional[Pipeline] = None) -> int:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think delete_all and delete should call a new function named _delete underneath, that accepts a kwargs (at least). This would be a bit cleaner.

aredis_om/model/model.py Outdated Show resolved Hide resolved
aredis_om/model/model.py Outdated Show resolved Hide resolved
Copy link
Contributor

@chayim chayim left a comment

Choose a reason for hiding this comment

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

WDYT>?

@dvora-h dvora-h changed the title Add delete_all to support for bulk deletes Add delete_many to support for bulk deletes Aug 8, 2022
@chayim
Copy link
Contributor

chayim commented Aug 10, 2022

@dvora-h don't know if you saw, but more-itertools/more-itertools#633 was merged and released to pypi. Bumping your dependency version should the first set of CI issues.

@chayim chayim self-requested a review August 10, 2022 13:20
@dvora-h dvora-h merged commit a00a68b into main Aug 10, 2022
@dvora-h dvora-h deleted the bulk-delete branch August 10, 2022 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants