Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firestore: impose required semantics for snapshots as cursors. #6837

Merged
merged 1 commit into from
Dec 12, 2018
Merged

Firestore: impose required semantics for snapshots as cursors. #6837

merged 1 commit into from
Dec 12, 2018

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Dec 4, 2018

  • Snapshot cursors imply on ordering on __name__, if not already present. Implied ordering is added at the end of the list, matching the direction of the prior entry (ASCENDING if none exist).

  • Snapshots copy their document reference into the __name__ field of their document values.

  • Disallow use of snapshots from foreign collections as query cursors.

  • In a query with one or more where clauses using ordering operators, and including a snapshot cursor, we must add ordering on the field(s) used (IFF the field is not already in the query's order_by).

Closes #6665.

- Snapshot cursors imply on ordering on '__name__', if not already
  present.  Implied ordering is added at the end of the list, matching
  the direction of the prior entry ('ASCENDING' if none exist).

- Snapshots copy their document reference into the '__name__' field
  of their document values.

- Disallow use of snapshots from foreign collections as query cursors.

- In a query with one or more 'where' clauses using ordering operators,
  and including a snapshot cursor, we must add ordering on the field(s)
  used (IFF the field is not already in the query's 'order_by').

Closes #6665.
@tseaver tseaver added the api: firestore Issues related to the Firestore API. label Dec 4, 2018
@tseaver tseaver requested a review from crwilcox December 4, 2018 15:27
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 4, 2018
@tseaver tseaver requested a review from mcdonc December 5, 2018 20:45
@tseaver tseaver merged commit 922ac18 into googleapis:master Dec 12, 2018
@tseaver tseaver deleted the 6665-firestore-snapshot_cursor_semantics branch December 12, 2018 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants