Skip to content

Conversation

@schmidt-sebastian
Copy link
Contributor

The backend orders every query implicitly by document name, but if a cursor is specified, the order constraint has to be made explicit. This makes the Partition API harder to use, since the user needs to manually "prepend" and orderBy before they can use the cursor values in a QueryPartition.

This PR adds an implicit orderBy if the only cursor value is a DocumentReference. This is based on existing logic for DocumentSnapshots.

@schmidt-sebastian schmidt-sebastian requested review from a team as code owners October 14, 2020 20:49
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 14, 2020
@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #1328 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1328      +/-   ##
==========================================
- Coverage   98.49%   98.49%   -0.01%     
==========================================
  Files          32       32              
  Lines       19111    19105       -6     
  Branches     1464     1465       +1     
==========================================
- Hits        18823    18817       -6     
  Misses        285      285              
  Partials        3        3              
Impacted Files Coverage Δ
dev/src/reference.ts 99.89% <100.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdf5462...831f1e7. Read the comment docs.

@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Oct 15, 2020
Copy link

@thebrianchen thebrianchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

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 googleapis/nodejs-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.

3 participants