-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query should expose the value of more_result
after query.fetch is called
#423
Comments
I don't believe it should be returned to the user: that kind of state belongs on the query instance (like the cursor value). We could choose to save the |
Yeah, exposing sounds better. Fixing the title of the issue. |
more_result
more_result
after query.fetch is called
I don't think it belongs on the Two possible solutions that come to mind
|
@dhermes We already store the |
I'm saying we shouldn't be storing |
Where are you planning to track that state? In a cursor object returned by fetch? We could merge #425 and then move the two bits of state together. |
The state should not be tracked, it should be returned and the user may use it as is. Your plan of merge SGTM. Reviewing now. |
Fix #423: Expose the 'more_results' value fetched from the back-end.
This is a follow up to a discussion in googleapis#423 and googleapis#425. Also - Adding fetch_page() method to return the needed properties no longer available on the Query object. - Made fetch_page() fail if more_results is `NOT_FINISHED`, which seems to be intended for batched requests. - Added start_cursor and end_cursor properties to Query. - Updated docstrings to reflect change - Updated tests to ensure the returned cursor was always set. - Streamlined fetch()/fetch_page() tests to run via a single tweakable helper. - Updated a datastore.connection test to construct and return an initialized QueryResultBatch to simulate a valid cursor. - Updated regression.clear_datastore and regression.datastore to reflect changed API surface.
This is a follow up to a discussion in googleapis#423 and googleapis#425. Also - Adding fetch_page() method to return the needed properties no longer available on the Query object. - Made fetch_page() fail if more_results is `NOT_FINISHED`, which seems to be intended for batched requests. - Added start_cursor and end_cursor properties to Query. - Updated docstrings to reflect change - Updated tests to ensure the returned cursor was always set. - Streamlined fetch()/fetch_page() tests to run via a single tweakable helper. - Updated a datastore.connection test to construct and return an initialized QueryResultBatch to simulate a valid cursor. - Updated regression.clear_datastore and regression.datastore to reflect changed API surface.
This is a follow up to a discussion in googleapis#423 and googleapis#425. Also - Adding fetch_page() method to return the needed properties no longer available on the Query object. - Made fetch_page() fail if more_results is `NOT_FINISHED`, which seems to be intended for batched requests. - Added start_cursor and end_cursor properties to Query. - Updated docstrings to reflect change - Updated tests to ensure the returned cursor was always set. - Streamlined fetch()/fetch_page() tests to run via a single tweakable helper. - Updated a datastore.connection test to construct and return an initialized QueryResultBatch to simulate a valid cursor. - Updated regression.clear_datastore and regression.datastore to reflect changed API surface.
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
…ic enums (#423) * feat: enable "rest" transport in Python for services supporting numeric enums PiperOrigin-RevId: 508143576 Source-Link: googleapis/googleapis@7a702a9 Source-Link: googleapis/googleapis-gen@6ad1279 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmFkMTI3OWMwZTdhYTc4N2FjNmI2NmM5ZmQ0YTIxMDY5MmVkZmZjZCJ9 * fix typo * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* fix: Update detect_intent_synthesize_tts_response.py * Update detect_intent_synthesize_tts_response.py
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
* chore: Update gapic-generator-python to v1.11.4 PiperOrigin-RevId: 547897126 Source-Link: googleapis/googleapis@c09c75e Source-Link: googleapis/googleapis-gen@45e0ec4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDVlMGVjNDM0MzUxN2NkMGFhNjZiNWNhNjQyMzJhMTgwMmMyZjk0NSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* chore: Update gapic-generator-python to v1.11.7 PiperOrigin-RevId: 573230664 Source-Link: googleapis/googleapis@93beed3 Source-Link: googleapis/googleapis-gen@f4a4eda Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRhNGVkYWE4MDU3NjM5ZmNmNmFkZjkxNzk4NzIyODBkMWE4ZjY1MSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update gapic-generator-python to v1.11.8 PiperOrigin-RevId: 574178735 Source-Link: googleapis/googleapis@7307199 Source-Link: googleapis/googleapis-gen@ce3af21 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2UzYWYyMWI3YzU1OWE4N2MyYmVmYzA3NmJlMGUzYWVkYTNhMjZmMCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: Update gapic-generator-python to v1.11.9 PiperOrigin-RevId: 574520922 Source-Link: googleapis/googleapis@5183984 Source-Link: googleapis/googleapis-gen@a59af19 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTU5YWYxOWQ0YWM2NTA5ZmFlZGYxY2MzOTAyOTE0MWI2YTViODk2OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update post processor image; remove unused files * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
) Source-Link: https://togithub.com/googleapis/synthtool/commit/d6103f4a3540ba60f633a9e25c37ec5fe7e6286d Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:39f0f3f2be02ef036e297e376fe3b6256775576da8a6ccb1d5eeb80f4c8bf8fb
* chore(deps): update all dependencies * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
A user that runs query.fetch(5) and gets 4 results will not know if they should call it again or if that is all the results.
The text was updated successfully, but these errors were encountered: