Skip to content

Pagination Link header: last always points to the same page #573

Description

@arcangelo7

last in the Link header for pagination always points to the same page, whatever the result set.

Looks like count_query_results() in src/gquery.py returns a fixed 1000 (

return 1000
), with a note that the real count query was too expensive, so it's skipped.

Not sure what the intended fix would be, given the count is left out on purpose. One idea that avoids a COUNT: ask for page_size + 1 rows, drop the extra, emit next only if it came back. That gives a correct next and end-of-results without the count. You'd still not get last, but it's not accurate today anyway.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions