-
Notifications
You must be signed in to change notification settings - Fork 423
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
Paginated delete (fixes #987) #997
Conversation
@@ -110,6 +111,12 @@ def delete_records(self, filters=None, parent_id=None): | |||
comparison (see `kinto.core.utils.COMPARISON`). All filters | |||
are combined using *AND*. | |||
:type filters: list of :class:`kinto.core.storage.Filter` | |||
:param sorting: XXX |
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.
:param filters: Optionally filter the records by their attribute.
Each filter in this list is a tuple of a field, a value and a
comparison (see `kinto.core.utils.COMPARISON`). All filters
are combined using *AND*.
:type filters: list of :class:`kinto.core.storage.Filter`
:param sorting: Optionnally sort the records by attribute.
Each sort instruction in this list refers to a field and a
direction (negative means descending). All sort instructions are
cumulative.
:type sorting: list of :class:`kinto.core.storage.Sort`
:param pagination_rules: Optionnally paginate the list of records.
This list of rules aims to reduce the set of records to the current
page. A rule is a list of filters (see `filters` parameter),
and all rules are combined using *OR*.
:type pagination_rules: list of list of
:class:`kinto.core.storage.Filter`
:param int limit: Optionnally limit the number of records to be
retrieved.
@@ -111,6 +112,22 @@ def delete_records(self, filters=None, parent_id=None): | |||
are combined using *AND*. | |||
:type filters: list of :class:`kinto.core.storage.Filter` | |||
|
|||
:param sorting: Optionnally sort the records by attribute. |
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.
Optionally
🐑
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've just noticed that there is no Total-Records
header. I think we should also add it on DELETE for consistency.
@gabisurita so it should return the total records that will deleted accross all pages right? |
@leplatrem Yes, I think so. It should return the number of buckets that would be deleted without pagination. |
could you open an issue please :) ? |
Fixes #987