pip_services3_commons.data.TokenizedDataPage module
-
class
pip_services3_commons.data.TokenizedDataPage.
TokenizedDataPage
(data: List[Any], token: str = None, total: int = None) Bases:
object
Data transfer object that is used to pass results of paginated queries. It contains items of retrieved page and optional total number of items.
Most often this object type is used to send responses to paginated queries. Pagination parameters are defined by
TokenizedPagingParams
object. The token parameter in the TokenizedPagingParams there means where to start the searxh. The takes parameter sets number of items to return in the page. And the optional total parameter tells to return total number of items in the query.The data page returns a token that shall be passed to the next search as a starting point.
Remember: not all implementations support the total parameter because its generation may lead to severe performance implications.
See
PagingParams
Example:
page = my_data_client.get_data_by_filter( "123", FilterParams.from_tuples("completed", True), TokenizedPagingParams(None, 100, True) )