PaginationCursor Class
Namespace
Usage
A pagination cursor is created when a SOQL query is executed on a Database.getPaginationCursor() or a Database.getPaginationCursorWithBinds() call. When the SOQL query is invoked, the corresponding rows are returned from the pagination cursor.
Use a pagination cursor for traversing human-viewable data, such as a list of records in a UI. The maximum number of rows per pagination cursor is 100,000, regardless of whether the operation is synchronous or asynchronous.
For a comparison between pagination cursors and standard cursors, see Apex Cursors in the Apex Developer Guide.
For Apex pagination cursor limits, see Execution Governors and Limits in the Apex Developer Guide.
PaginationCursor Methods
The following are methods for PaginationCursor.
fetchDeleted(start, pageSize)
Signature
public Integer fetchDeleted(Integer start, Integer pageSize)
Parameters
Return Value
Type: Integer
fetchPage(start, pageSize)
Signature
public Database.CursorFetchResult fetchPage(Integer start, Integer pageSize)
Parameters
Return Value
Type: Database.CursorFetchResult
Contains the rows for the current page and the information used to fetch the next page.
getNumRecords()
Signature
public Integer getNumRecords()
Return Value
Type: Integer