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
Query should expose the value of more_result after query.fetch is called #423
We were told in #280 that more_results is broken in the API and it is noted in our code. This note was added in #287 and there is an accompanying discussion.
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 more_results value on the query (along with the end_cursor), and expose it via a method or property, even though we know (for now) that the back-end borks it: after all, they might fix it in the future.
changed the title [-]query.fetch should return the value of `more_result`[/-][+]Query should expose the value of `more_result` after query.fetch is called[/+]on Dec 17, 2014
Activity
dhermes commentedon Dec 17, 2014
We're getting mixed signals on this.
We were told in #280 that
more_resultsis broken in the API and it is noted in our code. This note was added in #287 and there is an accompanying discussion.tseaver commentedon Dec 17, 2014
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
more_resultsvalue on the query (along with theend_cursor), and expose it via a method or property, even though we know (for now) that the back-end borks it: after all, they might fix it in the future.silvolu commentedon Dec 17, 2014
Yeah, exposing sounds better. Fixing the title of the issue.
[-]query.fetch should return the value of `more_result`[/-][+]Query should expose the value of `more_result` after query.fetch is called[/+]dhermes commentedon Dec 17, 2014
I don't think it belongs on the
Queryobject. It is a result of a query, not a query itself (response, not request).Two possible solutions that come to mind
fetch_pagewhich returnsmore_results. (I prefer this)fetchwhich allows a tuple of things to be returned instead of just the fetched entities.tseaver commentedon Dec 17, 2014
@dhermes We already store the
cursoron the query; how ismore_resultsdifferent?dhermes commentedon Dec 17, 2014
I'm saying we shouldn't be storing
cursoron the query, I planned on changing this, so addingmore_resultswould be piling on.tseaver commentedon Dec 17, 2014
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.
dhermes commentedon Dec 17, 2014
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.
Merge pull request #425 from tseaver/423-expose_query_more_results
Removing cursor and more results from query object.
22 remaining items
chore(deps): update all dependencies (#423)
chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#423
chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#423
fix: `to_gbq` allows strings for DATE and floats for NUMERIC with `ap…
chore(main): release 0.17.0 (#472)
Move `libcst` to `install_requires` (#423)
fix: add upper-bound to google-auth dependency (#423)
chore(deps): update all dependencies (#423)
chore(deps): update dependency google-cloud-datastore to v2.14.0 (#423)
chore(main): release 1.9.1 (#423)
chore: drop mention of Python 2.7 from templates (#423)
fix: more should be boolean in fetch_page call (#423)
docs: block until the streaming pull shuts down (#424)
chore: use `gcp-sphinx-docfx-yaml` (#423)
tests: refactor samples fixtures (#423)