queryMore with the Apex Connector Framework
Custom adapters for Salesforce Connect don’t automatically support the queryMore method in API queries. However, your implementation must be able to break up large result sets into batches and iterate over them by using the queryMore method in the SOAP API. The default batch size is 500 records, but the query developer can adjust that value programmatically in the query call.
To support queryMore, your implementation must indicate whether more data exists than what’s in the current batch. When the Lightning Platform knows that more data exists, your API queries return a QueryResult object that’s similar to the following.
-
Support queryMore by Using Server-Driven Paging by Using Server-Driven Paging
With server-driven paging, the external system controls the paging and ignores any batch boundaries or page sizes that are specified in queries. To enable server-driven paging, declare the
QUERY_PAGINATION_SERVER_DRIVENcapability in yourDataSource.Providerclass. -
Support queryMore by Using Client-Driven Paging
With client-driven paging, you use
LIMITandOFFSETclauses to page through result sets.