Skip to content

Refactor Table.delete() to prefer argument doc_ids over cond #424

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

Merged
merged 1 commit into from
Aug 14, 2021

Conversation

laggardkernel
Copy link
Contributor

Table.get(cond, doc_id), .contains(), .update(). These methods support both query condition and doc_id(s) as the filter.
When query cond and doc_id are passed as params at the same, doc_id is preferred over cond and only doc_id is used.

Refactor Table.delete() to make it behave consistent with above methods.

`Table.get(cond, doc_id)`, `.contains()`, `.update()`. These methods
support both query condition and doc_id(s) as the filter, and `doc_ids`
is preferred over `cond`.
Refactor `Table.delete()` to make it behave consistent with above
methods.
@msiemens
Copy link
Owner

Good catch, thanks for contributing a fix! 🙂

@msiemens msiemens merged commit 3362a4b into msiemens:master Aug 14, 2021
@msiemens
Copy link
Owner

This has now been released in TinyDB v4.5.2 🙃

@laggardkernel laggardkernel deleted the feature/prioritize-ids branch August 24, 2022 01:41
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.

2 participants