QueryContext Class

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

Namespace

DataSource

QueryContext Properties

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.

Signature

public String queryMoreToken {get; set;}

Property Value

Type: String

tableSelection

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

Signature

public DataSource.TableSelection tableSelection {get; set;}

Property Value

Type: DataSource.TableSelection

QueryContext Methods

The following are methods for QueryContext.

get(metadata, offset, maxResults, tableSelection)

Creates an instance of the QueryContext class.

Signature

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

Parameters

  • 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.

Return Value

Type: DataSource.QueryContext