From 0fcd4b99d7c8011e77d3037abc4a06a5826808a3 Mon Sep 17 00:00:00 2001 From: Jim Witschey Date: Thu, 13 Jul 2017 15:41:42 -0400 Subject: [PATCH] flesh out ResultSet upgrade guide (#796) PYTHON-464 --- docs/upgrading.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/upgrading.rst b/docs/upgrading.rst index 93ac213c..9ab8eb31 100644 --- a/docs/upgrading.rst +++ b/docs/upgrading.rst @@ -46,9 +46,16 @@ materialize a list using the iterator: results = session.execute("SELECT * FROM system.local") row_list = list(results) -For backward compatability, :class:`~.ResultSet` supports indexing. If -the result is paged, all pages will be materialized. A warning will -be logged if a paged query is implicitly materialized. +For backward compatability, :class:`~.ResultSet` supports indexing. When +accessed at an index, a `~.ResultSet` object will materialize all its pages: + +.. 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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~