StreamedResultSet API¶
Wrapper for streaming results.
- class google.cloud.spanner_v1.streamed.StreamedResultSet(response_iterator, source=None, column_info=None)[source]¶
Bases:
object
Process a sequence of partial result sets into a single set of row data.
- Parameters
response_iterator – Iterator yielding
PartialResultSet
instances.source (
Snapshot
) – Snapshot from which the result set was fetched.
- property fields¶
Field descriptors for result set columns.
- Return type
list of
Field
- Returns
list of fields describing column names / types.
- property metadata¶
Result set metadata
- Return type
- Returns
structure describing the results
- one()[source]¶
Return exactly one result, or raise an exception.
- Raises
NotFound
: If there are no results.- Raises
ValueError
: If there are multiple results.- Raises
RuntimeError
: If consumption has already occurred, in whole or in part.
- one_or_none()[source]¶
Return exactly one result, or None if there are no results.
- Raises
ValueError
: If there are multiple results.- Raises
RuntimeError
: If consumption has already occurred, in whole or in part.
- property stats¶
Result set statistics
- Return type
- Returns
structure describing status about the response