QueryContext Class

An instance of QueryContext is provided to the query method on your DataSource.Connection class. The instance corresponds to a SOQL request.

DataSource

The following are properties for QueryContext.

  • queryMoreToken

    Query token that’s used for server-driven paging to determine and fetch the subsequent batch of results.

  • tableSelection

    Query details that represent the FROM, ORDER BY, SELECT, and WHERE clauses in a SOQL or SOSL query.

Query token that’s used for server-driven paging to determine and fetch the subsequent batch of results.

public String queryMoreToken {get; set;}

Type: String

Query details that represent the FROM, ORDER BY, SELECT, and WHERE clauses in a SOQL or SOSL query.

public DataSource.TableSelection tableSelection {get; set;}

Type: DataSource.TableSelection

The following are methods for QueryContext.

Creates an instance of the QueryContext class.

public static DataSource.QueryContext get(List<DataSource.Table> metadata, Integer offset, Integer maxResults, DataSource.TableSelection tableSelection)

  • metadata:

    Type: List<DataSource.Table>

    List of table metadata that describes the external system’s tables to query.

  • offset:

    Type: Integer

    Used

    for client-driven paging. Specifies the starting row offset into the query’s result set.

  • maxResults:

    Type: Integer

    Used

    for client-driven paging. Specifies the maximum number of rows to return in each batch.

  • tableSelection:

    Type: DataSource.TableSelection

    Query details that represent

    the FROM, ORDER BY, SELECT, and WHERE clauses in a SOQL or SOSL query.

Type: DataSource.QueryContext