Paginator
Paginator class
:property number_of_items_per_page: The default number of items per page
:type number_of_items_per_page: int
Attributes
page_info: PageInforesults: listFunctions
__init__
Initialize self. See help(type(self)) for accurate signature.
query :
ModelSelect page :
int - 0 nb_of_items_per_page :
int - 20 nb_max_of_items_per_page :
int - 100 filter
Filter the current items in the paginators, the total count become approximate
filter_ :
Callable min_nb_of_result :
int - 0 If provided, the query will be called multiple time until the number of result is
greater than this value.
get_page
Return the current page as a PageDTO
Return type :
PageDTO[~PaginatorType] map_page
Set a function that will be call on each element to convert the result element
map_result :
Callable _description_
Return type :
PageDTO[Any] map_result
Apply a function to each element and return a new Paginator with transformed results
map_result :
Callable Function to apply to each element
Return type :
Paginator to_dto
Return type :
PageDTO[BaseModelDTO]