-
Notifications
You must be signed in to change notification settings - Fork 3
Implement pagination for Admin API raw queries to be consistent with built-in result set pagination #8
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
Comments
@s1monj, we can close this ticket. After thorough research, I found some resources I will include for future reference. We're using GenericViewSets and mostly ModelViewSets. Both classes use QuerySet slicing. Fetch to the DB happens, and then Django's ORM uses lazy QuerySets, which slice at the database level, effectively translating into SQL LIMIT and OFFSET clauses.
and |
|
Also we will need to consider how to return the total - so probably best to run 2 queries again as per slack discussion
so then when the request is made we execute query1_total and query1_page as two separate calls to the DB |
@travis-sauer-oltech I needed to revert ![]() |
While we're on the subject of pagination
The text was updated successfully, but these errors were encountered: