sqlx_expand_paginated_query!() { /* proc-macro */ }
Expand description
Similar to sqlx::expand_query!
but includes pagination capabilities.
Input parameters:
record = Type
(mandatory): The type of the retrieved recordquery = String
(mandatory): The query to be executedargs = [Expr]
(optional): The arguments toquery
extra_row = bool
(optional): Wether to return an extra row or not (useful to determine if there’s a previous/next page)columns = [Ident]
(mandatory): The columns to order by, each row should be uniquely identified by this combination of columns.- The ordering can also be specified and defaults to
asc
. For example[timestamp.desc(), id.asc()]
- The ordering can also be specified and defaults to
first = Expr
(optional): The number of rows to return for forward paginationlast = Expr
(optional): The number of rows to return for backward paginationafter = Expr
(optional): The variable for a tuple with the values of the cursor for thecolumns
in the same order when forward paginatingbefore = Expr
(optional): The variable for a tuple with the values of the cursor for thecolumns
in the same order when backward paginating