parent
f7881d9e04
commit
0fcd4b99d7
|
@ -46,9 +46,16 @@ materialize a list using the iterator:
|
||||||
results = session.execute("SELECT * FROM system.local")
|
results = session.execute("SELECT * FROM system.local")
|
||||||
row_list = list(results)
|
row_list = list(results)
|
||||||
|
|
||||||
For backward compatability, :class:`~.ResultSet` supports indexing. If
|
For backward compatability, :class:`~.ResultSet` supports indexing. When
|
||||||
the result is paged, all pages will be materialized. A warning will
|
accessed at an index, a `~.ResultSet` object will materialize all its pages:
|
||||||
be logged if a paged query is implicitly materialized.
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
results = session.execute("SELECT * FROM system.local")
|
||||||
|
first_result = results[0] # materializes results, fetching all pages
|
||||||
|
|
||||||
|
This can send requests and load (possibly large) results into memory, so
|
||||||
|
`~.ResultSet` will log a warning on implicit materialization.
|
||||||
|
|
||||||
Trace information is not attached to executed Statements
|
Trace information is not attached to executed Statements
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
Loading…
Reference in New Issue