Results
AsyncQueryResult
- class acouchbase_columnar.result.AsyncQueryResult
- cancel()
Cancel streaming the query results.
VOLATILE This API is subject to change at any time.
- Return type:
- rows()
Retrieve the rows which have been returned by the query.
Note
Bee sure to use
async for
when looping over rows.- Return type:
AsyncIterator
- Returns:
An async iterator for iterating over query results.
- async get_all_rows()
Convenience method to load all query results into memory.
Example
Read all rows from simple query:
q_str = 'SELECT * FROM `travel-sample`.inventory WHERE country LIKE 'United%' LIMIT 2;' q_rows = await cluster.execute_query(q_str).all_rows()
- metadata()
The meta-data which has been returned by the query.
- Return type:
QueryMetadata
- Returns:
A QueryMetadata instance (if available).
- Raises:
RuntimeError – When the metadata is not available. Metadata is only available once all rows have been iterated.