Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Pagination for queries with filters #673

@sebj54

Description

@sebj54

Feature Request

A new (or updated?) metadata to be able to get count of items matching the filter (when using a limit).

What problem does this feature solve?

Actually, the only metadatas we can get are:

  • result_count - Number of items returned in this response ➡ When using a limit, it returns the limit if there are more results (not really useful)
  • total_count - Total number of items in this collection ➡ When using a filter, it really returns the total count, without using the limit (not really useful either).

How do you think this should be implemented?

Maybe a new metadata (filter_count?) or use the same filters in total_count.
Why not also use MySQL's FOUND_ROWS() function? https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_found-rows
This can be really useful for complex queries (we only have to build and call query once).

Would you be willing to work on this?

Why not, but I'm actually very busy 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions