Paging
Paging request constraints help to traverse large lists of records by splitting them into several parts that are requested separately. This technique is used to reduce the amount of data transferred over the network and to reduce the load on the server. evitaDB supports several ways to paginate query results, which are described in this section.
Page
- argument:int
a mandatory number of page to be returned, positive integer starting from 1
- argument:int
a mandatory size of the page to be returned, positive integer
- pageNumber
the number of the page returned in the query response
- pageSize
the size of the page returned in the query response
- lastPageNumber
- the last page number available for the query, the request for lastPageNumber + 1 returns the first page
- firstPageItemNumber
the offset of the first record of current page with current page size
- lastPageItemNumber
the offset of the last record of current page with current page size
- first
- TRUE if the current page is the first page available
- last
- TRUE if the current page is the last page available
- hasNext
- TRUE if there is a data for the next page available (i.e. pageNumber + 1 <= lastPageNumber)
- hasPrevious
- TRUE if the current page is the last page available (i.e. pageNumber - 1 > 0)
- empty
- TRUE if the query returned no data at all (i.e. totalRecordCount == 0)
- singlePage
- TRUE if the query returned exactly one page of data (i.e. pageNumber == 1 && lastPageNumber == 1 && totalRecordCount > 0)
- totalRecordCount
the total number of entities available for the query
- data
the list of entities returned in the query response
The result contains the result from the 6th through the 10th record of the query result. It returns only a primary key of the records because no content request was specified, and it is sorted by the primary key in ascending order because no order was specified in the query.
Strip
- argument:int
a mandatory offset of the first record of the page to be returned, positive integer starting from 0
- argument:int
a mandatory limit of the records to be returned, positive integer
- offset
the offset of the first record returned in the query response
- limit
the limit of the records returned in the query response
- first
- TRUE if the current strip starts with the first records of the query result
- last
- TRUE if the current strip ends with the last records of the query result
- hasNext
- TRUE if there is a data for the next next available (i.e. last == false)
- hasPrevious
- TRUE if the current page is the last page available (i.e. first == false)
- empty
- TRUE if the query returned no data at all (i.e. totalRecordCount == 0)
- totalRecordCount
the total number of entities available for the query
- data
the list of entities returned in the query response
The result contains the result from the 76th through the 95th record of the query result. It returns only a primary key of the records because no content request was specified, and it is sorted by the primary key in ascending order because no order was specified in the query.