QueryResult represents the result of query method and results returned by iteration over queryIterable. It contains a list of row instances representing the query results.

The shape of the values is based on the schema implied by the query. For example a query such as "SELECT * FROM ..." that returns an intact row will return values that conform to the schema of the table. Projections return instances that conform to the schema implied by the statement. UPDATE queries either return values based on a RETURNING clause or, by default, the number of rows affected by the statement.

For query method, if the value of continuationKey is not null there are additional results available. That value can be supplied as continuationKey to subsequent call to query to continue the query. It is possible for a query to return no results in an empty list but still have a non-null continuation key. This happens if the query reads the maximum amount of data allowed in a single request without matching a query predicate. In this case, the continuation key must be used to get results, if any exist.

Type Parameters

  • TRow = AnyRow

    Type of table row instance, defaults to AnyRow

Hierarchy

Properties

consumedCapacity?: ConsumedCapacity

Capacity consumed by this operation, see ConsumedCapacity. Undefined if using on-premises service or if this is a result of a put or a delete sub-operation as part of WriteMultipleResult.

continuationKey?: QueryContinuationKey

Continuation key, undefined if there are no more results available.

rows: TRow[]

Results for the query as array of TRow instances, the array may be empty.

Generated using TypeDoc