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 — Firestore: Use simple types for cursors · Issue #4109 · googleapis/google-cloud-python

Firestore: Use simple types for cursors #4109

New issue
Copy link
New issue
Copy link
Closed
Closed
Firestore: Use simple types for cursors#4109
Copy link
Assignees
dhermes
Labels
api: firestoreIssues related to the Firestore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@dhermes
dhermes
opened on Oct 3, 2017
Issue body actions

i.e.

db = firestore.Client()
query = db.collection('cities').order_by('population').start_at(1000000)

rather than the current

db = firestore.Client()
query = db.collection('cities').order_by('population').start_at({'population': 1000000})

/cc @samtstern @jonparrott

Activity

  1. dhermes
    added
    api: firestoreIssues related to the Firestore API.
    on Oct 3, 2017
  2. dhermes
    self-assigned this
    on Oct 3, 2017
  3. dhermes commented on Oct 3, 2017

    @dhermes
    dhermes
    on Oct 3, 2017
    ContributorAuthor
    More actions

    If I was to implement this I could, by accepting *values and then making sure either

    1. len(values) == len(self._orders)
    2. len(values) <= len(self._orders)

    then we could just match each value with the corresponding order. It's documented that subsequent calls to start_at() just RESET the start point wholesale (and start_after() also wipes it, and similar for end_before() / end_at()).

    Also the question would be if we should still accept a dictionary or DocumentSnapshot (which IMO is a "saner" interface). @jonparrott indicates yes.


    From @samtstern:

    Cursors can be on multiple fields but you have to specify each one. Here are some Android snippets to demonstrate:

    // Will return all Springfields
    db.collection("cities")
            .orderBy("name")
            .orderBy("state")
            .startAt("Springfield");
    
    // Will return "Springfield, Missouri" and "Springfield, Wisconsin"
    db.collection("cities")
            .orderBy("name")
            .orderBy("state")
            .startAt("Springfield", "Missouri");
  4. tseaver
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Nov 2, 2017
  5. schmidt-sebastian commented on Jan 29, 2018

    @schmidt-sebastian
    schmidt-sebastian
    on Jan 29, 2018
    More actions

    Firestore should also accept DocumentSnapshot cursors similar to googleapis/google-cloud-java#2768

  6. chemelnucfin commented on Feb 26, 2018

    @chemelnucfin
    chemelnucfin
    on Feb 26, 2018
    Contributor
    More actions

    I'm going to put this in the back log for now and track it through here:
    Feature Requests

  7. chemelnucfin
    closed this as completedon Feb 26, 2018
  8. schmidt-sebastian commented on May 4, 2018

    @schmidt-sebastian
    schmidt-sebastian
    on May 4, 2018
    More actions

    @chemelnucfin I don't see an issue for DocumentSnapshot cursors. The issue that I see in Feature Request (#4109) cleans up the cursor API, which is a precursor for googleapis/google-cloud-java#2768

  9. parthea
    added a commit that references this issue on Sep 22, 2023

    chore: move samples from python-docs-sample (#66)

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

Metadata

Metadata

Assignees

  • @dhermes
    dhermes

Labels

api: firestoreIssues related to the Firestore 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.