Pagination
Teo supports offset pagination, page size based pagination and cursor based pagination.
Offset pagination
Offset pagination uses skip
and take
to skip a certain number of results
and select a limited range. The following query skips the first 2 records
and returns records 3 - 5:
Take from opposite direction
If a negative take is provided, it takes from the other side.
Pagination with pageNumber
and pageSize
This query takes records on the 2nd page. numberOfPages
is also returned in
meta
section of the results.
Cursor based pagination
Cursor based pagination uses cursor
and take
to return a limited set of
results before or after a given cursor. A cursor bookmarks your location in a
result set and must be a unique, sequential column.