Skip to content

Commit 22d1b05

Browse files
committed
docs: add missing comments to pagination examples
1 parent 3ab2a32 commit 22d1b05

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

test/examples/src/features/pagination/partition_search_pagination.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,17 @@
4545
# Do something with row
4646
pass
4747

48+
# Option: use pager next page
4849
# For retrieving one page at a time with a method call.
4950
pager: Pager = pagination.pager()
5051
if pager.has_next():
5152
page = pager.get_next()
5253
# Do something with page
5354

55+
# Option: use pager all results
56+
# For retrieving all result rows in a single list
57+
# Note: all result rows may be very large!
58+
# Preferably use iterables instead of get_all for memory efficiency with large result sets.
5459
all_pager: Pager = pagination.pager()
5560
all_rows = all_pager.get_all()
5661
for page in all_rows:

test/examples/src/features/pagination/search_pagination.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,17 @@
4444
# Do something with row
4545
pass
4646

47+
# Option: use pager next page
4748
# For retrieving one page at a time with a method call.
4849
pager: Pager = pagination.pager()
4950
if pager.has_next():
5051
page = pager.get_next()
5152
# Do something with page
5253

54+
# Option: use pager all results
55+
# For retrieving all result rows in a single list
56+
# Note: all result rows may be very large!
57+
# Preferably use iterables instead of get_all for memory efficiency with large result sets.
5358
all_pager: Pager = pagination.pager()
5459
all_rows = all_pager.get_all()
5560
for page in all_rows:

test/examples/src/features/pagination/view_pagination.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,17 @@
4343
# Do something with row
4444
pass
4545

46+
# Option: use pager next page
4647
# For retrieving one page at a time with a method call.
4748
pager: Pager = pagination.pager()
4849
if pager.has_next():
4950
page = pager.get_next()
5051
# Do something with page
5152

53+
# Option: use pager all results
54+
# For retrieving all result rows in a single list
55+
# Note: all result rows may be very large!
56+
# Preferably use iterables instead of get_all for memory efficiency with large result sets.
5257
all_pager: Pager = pagination.pager()
5358
all_rows = all_pager.get_all()
5459
for page in all_rows:

0 commit comments

Comments
 (0)