Defines the interface for RowStream
implementations.
The RowStream
class represents a stream of Rows
returned from spanner::Client::Read()
or spanner::Client::ExecuteQuery()
. There are different implementations depending the the RPC. Applications can also mock this class when testing their code and mocking the spanner::Client
behavior.
Functions
NextRow()
Returns the next row in the stream.
Returns | |
---|---|
Type | Description |
StatusOr< spanner::Row > | if the stream is interrupted due to a failure the |
Metadata()
Returns metadata about the result set, such as the field types and the transaction id created by the request.
See Also
https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.v1#resultsetmetadata for more information.
Returns | |
---|---|
Type | Description |
absl::optional< google::spanner::v1::ResultSetMetadata > |
Stats() const
Returns statistics about the result set, such as the number of rows, and the query plan used to compute the results.
See Also
https://cloud.google.com/spanner/docs/reference/rpc/google.spanner.v1#resultsetstats for more information.
Returns | |
---|---|
Type | Description |
absl::optional< google::spanner::v1::ResultSetStats > |