You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide a convenient way to get all results from a com.google.gcloud.Page #330
In cases when paging between different requests is not necessary (all results are consumed in the same request/thread) a common usage-pattern would be as such:
To avoid this boilerplate code It would be nice to add to the Page class a method to return
an Iterator for all the results (and let that Iterator do the paging).
Some options:
(1) add a static method such as Page.iterateAll(page)
(2) an instance method such as page.allValues() or page.iterateAll() or page.fetchAll()
changed the title [-]Provide a convenient way to get *all* results from a com.google.gcloud.Page[/-][+]Provide a convenient way to get all results from a com.google.gcloud.Page[/+]on Nov 6, 2015
I would prefer an instance method. I would also not use allValues as we alredy have a values method that returns Iterable instead. My preference is iterateAll or simply iterator provided that we document what the method does.
Activity
[-]Provide a convenient way to get *all* results from a com.google.gcloud.Page[/-][+]Provide a convenient way to get all results from a com.google.gcloud.Page[/+]mziccard commentedon Nov 6, 2015
I would prefer an instance method. I would also not use
allValuesas we alredy have avaluesmethod that returnsIterableinstead. My preference isiterateAllor simplyiteratorprovided that we document what the method does.aozarov commentedon Nov 6, 2015
Sure, I like
iterateAllbetter thaniteratorfor being more explicit.chore: regenerate README (googleapis#330)
chore(deps): update dependency com.google.cloud:google-cloud-workflow…
chore(main): release 2.3.1 (#330)
chore(bazel): update protobuf to v3.21.3 (#330)
docs: Updating comments (#330)
chore(main): release 2.3.8 (#340)
chore(main): release 1.3.1 (#330)
chore: regenerate README (#330)
build(java): update autorelease script (#330)
chore: regenerate README (#330)
chore: cleanup javadoc warnings (#330)
chore: regenerate README (googleapis#330)
chore: cleanup javadoc warnings (#330)
chore: adding docfx doclet resource (googleapis#330)
chore: specify primary CODEOWNERS team in repo-metadata (googleapis#330)