Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
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