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 — Should QueryResults extend Iterable rather than Iterator? · Issue #101 · googleapis/google-cloud-java

Should QueryResults extend Iterable rather than Iterator? #101

New issue
Copy link
New issue
Copy link
Closed
Closed
Should QueryResults extend Iterable rather than Iterator?#101
Copy link
Assignees
garrettjonesgoogle
Labels
api: datastoreIssues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@eamonnmcmanus
eamonnmcmanus
opened on Jun 8, 2015
Issue body actions

If QueryResults<T> extended Iterable<T> rather than Iterator<T> then it could be used in a for-each loop:

QueryResults<Entity> results = datastore.run(query);
for (Entity result : results) {...}

However, this is potentially confusing, because the Iterable interface implies that the result can be iterated more than once, so we would either have to document that an attempt to do so will fail, or make it so that every time you call iterator() a new query is issued. Neither of these is very desirable, so perhaps we should just add a note to QueryResults that heads off this obvious question that users are going to ask.

Activity

  1. ajkannan
    added
    api: datastoreIssues related to the Datastore API.
    on Apr 5, 2016
  2. garrettjonesgoogle
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    triaged for beta
    on Nov 23, 2016
  3. garrettjonesgoogle commented on Jan 26, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jan 26, 2017
    Contributor
    More actions

    No one else seems to have chimed in after a year and a half - closing this out.

  4. garrettjonesgoogle
    closed this as completedon Jan 26, 2017
  5. garrettjonesgoogle
    removed
    triaged for beta
    on Jan 26, 2017
  6. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  7. github-actions
    added a commit that references this issue on Jun 21, 2022

    build(deps): update dependency com.google.cloud:google-cloud-shared-c…

    63116ae
  8. github-actions
    added a commit that references this issue on Jun 29, 2022

    chore: update PR template (googleapis#101)

    9d94695
  9. github-actions
    added a commit that references this issue on Jul 18, 2022

    build(deps): update dependency org.apache.maven.plugins:maven-project…

    68e4320
  10. github-actions
    added a commit that references this issue on Aug 16, 2022

    build(deps): update dependency org.apache.maven.plugins:maven-project…

    cb7f47b
  11. github-actions
    added a commit that references this issue on Sep 15, 2022

    chore(main): release 1.1.3-SNAPSHOT (#101)

    8e89729
  12. github-actions
    added 5 commits that reference this issue on Sep 30, 2022

    Revert "chore: pin versions of dependencies for compatibility with Py… (

    81c87a2

    deps: update dependency protobuf to v3.20.2 (#101)

    90e1e17

    chore(main): release 0.5.5 (#104)

    d667dda

    chore(main): release 0.3.5 (#94)

    a2c85c4

    chore(main): release 0.5.3 (#108)

    3a04f5f
  13. meltsufin
    added a commit that references this issue on Dec 22, 2025

    chore(deps): update dependency com.google.cloud:libraries-bom to v4.1…

    7bd1846
  14. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(deps): update dependency com.google.cloud.samples:shared-config…

    e8b507e
  15. chingor13
    added a commit that references this issue on Jan 22, 2026

    test: update ITDatastoreTest test to attempt multiple times if a test…

    This issue will close once commit c2a8d0c is merged into the 'main' branch.
    c2a8d0c
  16. suztomo
    added a commit that references this issue on Mar 11, 2026

    chore(deps): update dependency com.google.cloud:libraries-bom to v4.1…

    b1a789e
  17. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore: release 1.15.1-SNAPSHOT (googleapis#101)

    298d90e
  18. meltsufin
    added 2 commits that reference this issue on Apr 29, 2026

    [CHANGE ME] Re-generated to pick up changes in the API or client libr…

    bf316ca

    [CHANGE ME] Re-generated to pick up changes in the API or client libr…

    a7422b3
  19. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore(deps): update protobuf packages to v3.11.0 (googleapis#101)

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

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

api: datastoreIssues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

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.