TableResult Class
Contains the results of a search or query.
The following are properties for TableResult.
-
errorMessage
-
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
queryMoreTokenproperty on theQueryContext. -
Rows of data.
-
Whether the search or query was successful.
-
Name of the table that was queried.
-
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.
-
get(success, errorMessage, tableName, rows, totalSize)
Returns a subset of data rows in a
TableResultwith the provided property values and the number of rows in the table. -
get(success, errorMessage, tableName, rows)
Returns a subset of data rows in a
TableResultwith the provided property values. -
Returns the subset of data rows that meet the query criteria, and the number of rows in the table, in a
TableResult. -
Returns the subset of data rows that meet the query criteria, and the number of rows in the table, in a
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.
| Property | Value |
|---|---|
| success | false |
| errorMessage | errorMessage |
| tableName | null |
| rows | null |
| 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:
-
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: 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)
-
queryContext:
Type: DataSource.QueryContext
Represents
the query to run against a data table.
-
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, andWHEREclauses in a SOQL or SOSL query. -
rows:
Type: DataSource.TableResult