We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aaaa100 commit 7a97e00Copy full SHA for 7a97e00
datastore/google/cloud/datastore/client.py
@@ -464,6 +464,23 @@ def query(self, **kwargs):
464
>>> for entity in query_iter:
465
... do_something(entity)
466
467
+ or manually page through results
468
+
469
+ .. code-block:: python
470
471
+ >>> query_iter = query.fetch(start_cursor='2mdd223i944')
472
+ >>> pages = query_iter.pages
473
+ >>>
474
+ >>> first_page = next(pages)
475
+ >>> first_page_entities = list(first_page)
476
+ >>> query_iter.next_page_token
477
+ 'abc-some-cursor'
478
479
+ >>> second_page = next(pages)
480
+ >>> second_page_entities = list(second_page)
481
+ >>> query_iter.next_page_token is None
482
+ True
483
484
Under the hood this is doing:
485
486
.. code-block:: python
0 commit comments