Pagination helpers for search results.
Summary
Functions
Paginates a list of results.
Types
@type page() :: %{ entries: [entry()], page_number: pos_integer(), page_size: pos_integer(), total_count: non_neg_integer(), total_pages: non_neg_integer(), has_next?: boolean(), has_prev?: boolean() }
Functions
Paginates a list of results.
Pages beyond the available results return an empty :entries list at the
requested page number, with :total_count/:total_pages still describing
the full result set.
Options
:page— page number, starting at 1 (default:1):page_size— number of results per page (default:20)
Returns a map with metadata about the current page.