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.fetch() w/o limit returns different results than w/ large limit. · Issue #491 · googleapis/google-cloud-python

Query.fetch() w/o limit returns different results than w/ large limit. #491

New issue
Copy link
New issue
Copy link
Closed
#492
Closed
Query.fetch() w/o limit returns different results than w/ large limit.#491
#492
Copy link
Assignees
tseaver
Labels
🚨This issue needs some love.api: datastoreIssues related to the Datastore API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@tseaver
tseaver
opened on Jan 6, 2015
Issue body actions
No description provided.

Activity

Next
  1. tseaver
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: datastoreIssues related to the Datastore API.
    on Jan 6, 2015
  2. tseaver
    self-assigned this
    on Jan 6, 2015
  3. dhermes commented on Jan 6, 2015

    @dhermes
    dhermes
    on Jan 6, 2015
    Contributor
    More actions

    Example:

    >>> from gcloud import datastore
    >>> from gcloud.datastore.entity import Entity
    >>> from gcloud.datastore.key import Key
    >>> from gcloud.datastore.query import Query
    >>>
    >>> datastore.set_default_connection()
    >>> datastore.set_default_dataset(dataset_id='foo')
    >>>
    >>> q = Query(kind='Post')
    >>> list(q.fetch(limit=0))
    >>> []
    >>>
    >>> e = Entity(key=Key('Post'))
    >>> e['foo'] = 'bar'
    >>> e.save()
    >>> e.key
    <Key[{'kind': 'Post', 'id': 5021553624350720L}], dataset=foo>
    >>>
    >>> list(q.fetch())
    []
    >>>
    >>> list(q.fetch(limit=0))
    []
    >>>
    >>> list(q.fetch(limit=2))
    [<Entity[{'kind': u'Post', 'id': 5021553624350720L}] {u'foo': 'bar'}>]
  4. dhermes commented on Jan 6, 2015

    @dhermes
    dhermes
    on Jan 6, 2015
    Contributor
    More actions

    Also note – per our previous discussion about this – offset has a default while limit does not.

  5. dhermes commented on Jan 6, 2015

    @dhermes
    dhermes
    on Jan 6, 2015
    Contributor
    More actions

    Also, something which may help us in the future

    >>> from gcloud.datastore import datastore_v1_pb2 as datastore_pb
    >>> limit_field = datastore_pb.Query.DESCRIPTOR.fields_by_name['limit']
    >>> offset_field = datastore_pb.Query.DESCRIPTOR.fields_by_name['offset']
    >>> offset_field.has_default_value
    True
    >>> limit_field.has_default_value
    False
    >>> offset_field.default_value
    0
  6. tseaver
    closed this as completedin #492on Jan 6, 2015
  7. jgeewax
    modified the milestone: This milestone has been deleted on Jan 30, 2015
  8. tswast
    added a commit that references this issue on Mar 26, 2019

    Fixes BQ Models API generated code for Python 2.7 (googleapis#491)

    b453aaf
  9. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Apr 7, 2020
  10. atulep
    added 3 commits that reference this issue on Apr 3, 2023

    docs(v1): Clarified boost usage (#491)

    166516d

    docs(v1): Clarified boost usage (#491)

    4cd8439

    docs(v1): Clarified boost usage (#491)

    f83ccd0
  11. 6 remaining items

  12. parthea
    added 5 commits that reference this issue on Oct 21, 2023

    chore: use gapic-generator-python 1.3.1 (#491)

    75fd968

    build(deps): bump requests from 2.28.1 to 2.31.0 in /synthtool/gcp/te…

    c5ce7d2

    chore(main): release 3.1.3 (#491)

    966932e

    chore(main): release 2.11.2 (#491)

    7097d2d

    docs(v1): Clarified boost usage (#491)

    972c8f0
  13. parthea
    added a commit that references this issue on Aug 21, 2025

    chore(main): release 2.15.0 (#491)

    4e5aa84
  14. parthea
    added a commit that references this issue on Sep 16, 2025

    chore(main): release 2.15.0 (#491)

    2731d86
  15. parthea
    added 4 commits that reference this issue on Nov 22, 2025

    chore(python): Noxfile recognizes that tests can live in a folder (#491)

    196fff2

    chore(python): add requirements for docs build (#491)

    ec06c9a

    chore: use gapic-generator-python 0.56.2 (#491)

    e78dddd

    chore: release 1.14.1 (#491)

    bce0067
  16. parthea
    added 2 commits that reference this issue on Mar 2, 2026

    chore: release 2.8.0 (#491)

    5a86f8e

    fix: add max_length support to Gzip/Brotli decoders for urllib3 2.6+ (#…

    cb90060
  17. parthea
    added a commit that references this issue on Mar 9, 2026

    chore(deps): update dependency google-auth to v2.36.0 (#491)

    c948e25
  18. parthea
    added a commit that references this issue on Sep 8, 2026

    docs: migrate code from googleapis/python-bigquery (#18303)

    23f9a74
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: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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.