GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Query should expose the value of `more_result` after query.fetch is called · Issue #423 · googleapis/google-cloud-python

Query should expose the value of more_result after query.fetch is called #423

New issue
Copy link
New issue
Copy link
Closed
#425
Closed
Query should expose the value of more_result after query.fetch is called#423
#425
Copy link
Assignees
tseaver
Labels
🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Description

@silvolu
silvolu
opened on Dec 17, 2014
Issue body actions

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.

Activity

Next
  1. silvolu
    added
    api: datastoreIssues related to the Datastore API.
    fix-asap
    on Dec 17, 2014
  2. dhermes commented on Dec 17, 2014

    @dhermes
    dhermes
    on Dec 17, 2014
    Contributor
    More actions

    We're getting mixed signals on this.

    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.

  3. tseaver commented on Dec 17, 2014

    @tseaver
    tseaver
    on Dec 17, 2014
    Contributor
    More actions

    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.

  4. silvolu commented on Dec 17, 2014

    @silvolu
    silvolu
    on Dec 17, 2014
    ContributorAuthor
    More actions

    Yeah, exposing sounds better. Fixing the title of the issue.

  5. silvolu
    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
  6. tseaver
    self-assigned this
    on Dec 17, 2014
  7. dhermes commented on Dec 17, 2014

    @dhermes
    dhermes
    on Dec 17, 2014
    Contributor
    More actions

    I don't think it belongs on the Query object. It is a result of a query, not a query itself (response, not request).

    Two possible solutions that come to mind

    • Create a separate method fetch_page which returns more_results. (I prefer this)
    • Add a flag to fetch which allows a tuple of things to be returned instead of just the fetched entities.
  8. tseaver commented on Dec 17, 2014

    @tseaver
    tseaver
    on Dec 17, 2014
    Contributor
    More actions

    @dhermes We already store the cursor on the query; how is more_results different?

  9. dhermes commented on Dec 17, 2014

    @dhermes
    dhermes
    on Dec 17, 2014
    Contributor
    More actions

    I'm saying we shouldn't be storing cursor on the query, I planned on changing this, so adding more_results would be piling on.

  10. tseaver commented on Dec 17, 2014

    @tseaver
    tseaver
    on Dec 17, 2014
    Contributor
    More actions

    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.

  11. dhermes commented on Dec 17, 2014

    @dhermes
    dhermes
    on Dec 17, 2014
    Contributor
    More actions

    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.

  12. tseaver
    closed this as completedin #425on Dec 17, 2014
  13. tseaver
    added a commit that references this issue on Dec 17, 2014

    Merge pull request #425 from tseaver/423-expose_query_more_results

    This issue will close once commit 1b9f1c2 is merged into the 'main' branch.
    1b9f1c2
  14. dhermes
    added a commit that references this issue on Dec 17, 2014

    Removing cursor and more results from query object.

    715f8d6
  15. 22 remaining items

  16. parthea
    added a commit that references this issue on Oct 22, 2023

    chore(deps): update all dependencies (#423)

    43c27f1
  17. parthea
    added a commit that references this issue on Aug 21, 2025

    chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#423

    584c39e
  18. parthea
    added 3 commits that reference this issue on Sep 16, 2025

    chore(python): update .pre-commit-config.yaml to use black==22.3.0 (#423

    31d5845

    fix: `to_gbq` allows strings for DATE and floats for NUMERIC with `ap…

    8fde55c

    chore(main): release 0.17.0 (#472)

    8a5066c
  19. parthea
    added 7 commits that reference this issue on Nov 24, 2025

    Move `libcst` to `install_requires` (#423)

    55078f5

    fix: add upper-bound to google-auth dependency (#423)

    a842b76

    chore(deps): update all dependencies (#423)

    11ea41c

    chore(deps): update dependency google-cloud-datastore to v2.14.0 (#423)

    edddb63

    chore(main): release 1.9.1 (#423)

    f21265a

    chore: drop mention of Python 2.7 from templates (#423)

    428228e

    fix: more should be boolean in fetch_page call (#423)

    ded9bab
  20. parthea
    added a commit that references this issue on Mar 2, 2026

    docs: block until the streaming pull shuts down (#424)

    This issue will close once commit c2cbf91 is merged into the 'main' branch.
    c2cbf91
  21. parthea
    added 2 commits that reference this issue on Mar 9, 2026

    chore: use `gcp-sphinx-docfx-yaml` (#423)

    d7f0e00

    tests: refactor samples fixtures (#423)

    9236f55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.