Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pageSize vs. maxResults #3277

@dhermes

Description

@dhermes

What is the point of the two arguments? For old-style APIs (i.e. discovery based), JSON paging is done via maxResults.

For new-style APIs (i.e. those with gRPC support), paging is done via pageSize (both in JSON and gRPC).

Currently our iterator takes maxResults to mean a maximum over many pages while pageSize (at least in terms of the two english words put together) means the size of one page.

  • Is it worth offering distinct page_size and max_results keyword params?
  • @lukesneeringer, is there an equivalent concept of max results vs. page size in GAX?
  • When no pageSize is used in a new-style API what happens? Some of our GAX helper docstrings say "If not passed, defaults to a value set by the API."

/cc @bjwatson @tseaver @jonparrott

Relevant to #3270 (comment)

NOTE: This is copied mostly verbatim from an old email thread.

Metadata

Metadata

Assignees

Labels

api: coretype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions