TableResult Class

Contains the results of a search or query.

DataSource

The following are properties for TableResult.

  • errorMessage

    errorMessage

  • queryMoreToken

    Query token that’s used for server-driven paging to determine and fetch the subsequent batch of results. This token is passed back to the Apex data source on subsequent queries in the queryMoreToken property on the QueryContext.​

  • rows

    Rows of data.

  • success

    Whether the search or query was successful.

  • tableName

    Name of the table that was queried.

  • totalSize

    The total number of rows that meet the query criteria, even when the external system is requested to return a smaller batch size.

errorMessage

public String errorMessage {get; set;}

Type: String

Query token that’s used for server-driven paging to determine and fetch the subsequent batch of results. This token is passed back to the Apex data source on subsequent queries in the queryMoreToken property on the QueryContext.​

public String queryMoreToken {get; set;}

Type: String

Rows of data.

public List<Map<String,Object>> rows {get; set;}

Type: List<Map<String, Object>>

Whether the search or query was successful.

public Boolean success {get; set;}

Type: Boolean

Name of the table that was queried.

public String tableName {get; set;}

Type: String

The total number of rows that meet the query criteria, even when the external system is requested to return a smaller batch size.

public Integer totalSize {get; set;}

Type: Integer

The following are methods for TableResult.

Returns failed search or query results with the provided error message.

public static DataSource.TableResult error(String errorMessage)

  • errorMessage:

    Type: String errorMessage

Type: DataSource.TableResult

The returned TableResult has these property values.

PropertyValue
successfalse
errorMessageerrorMessage
tableNamenull
rowsnull
rows.size()0

Returns a subset of data rows in a TableResult with the provided property values and the number of rows in the table.

public static DataSource.TableResult get(Boolean success, String errorMessage, String tableName, List<Map<String,Object>> rows, Integer totalSize)

  • success:

    Type: Boolean

    Whether the search or query was successful.

  • errorMessage:

    Type: String errorMessage

  • tableName:

    Type: String

    Name of the table that was queried.

  • rows:

    Type: List<Map<String, Object>> Rows of data.

  • totalSize:

    Type: Integer

    The total number of rows that meet the query criteria, even when the external system is requested to return a smaller batch size.

Type: DataSource.TableResult

Returns a subset of data rows in a TableResult with the provided property values.

public static DataSource.TableResult get(Boolean success, String errorMessage, String tableName, List<Map<String,Object>> rows)

  • success:

    Type: Boolean

    Whether the search or query was successful.

  • errorMessage:

    Type: String errorMessage

  • tableName:

    Type: String

    Name of the table that was queried.

  • rows:

    Type: List<Map<String, Object>> Rows of data.

Type: DataSource.TableResult

Returns the subset of data rows that meet the query criteria, and the number of rows in the table, in a TableResult.

public static DataSource.TableResult get(DataSource.QueryContext queryContext, List<Map<String,Object>> rows)

Type: DataSource.TableResult

Returns the subset of data rows that meet the query criteria, and the number of rows in the table, in a TableResult.

public static DataSource.TableResult get(DataSource.TableSelection tableSelection, List<Map<String,Object>> rows)

  • tableSelection:

    Type: DataSource.TableSelection

    Query details that represent

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

  • rows:

    Type: List<Map<String, Object>> Rows of data.

Type: DataSource.TableResult