-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: firestoreIssues related to the Firestore API.Issues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The "cursor-related" methods (Query.start_at, Query.start_after, Query.end_before, Query.end_at) accept a DocumentSnapshot instance for their document_fields method, but do not apply all required ordering semantics:
- Per this conformance test, for queries which do not explicitly have
__name__set in theirorder_byfield, passing aDocumentSnapshotto a cursor-related method implies ordering based on__name__, in the same direction as the last explicitly-specifiedorder_byfield. - Per this conformance test, for queries with no
order_byspecified, passing aDocumentSnapshotto a cursor-related method implies ordering based on__name__in ascending order. - Per this conformance test, whenever
__name__is already present in a query'sorder_by, passing aDocumentSnapshotto a cursor-related method does not change the query'sorder_by. - Per this conformance test, for queries with a
whereclause using an ordering operator but without a matchingorder_byfield, passing aDocumentSnapshotto a cursor-related method must addorder_byfields for both thewherefield and for__name__. - In any case where
__name__is present inorder_by, the snapshot's fully-qualified reference path (in formprojects/<PROJECT>/databases/<DATABASE>/<DATABASE-RELATIVE_PATH>is passed in the corresponding cursor field. - Per this conformance test, passing a
DocumentSnapshotfrom a foreign collection to a cursor-related method must raise an error.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: firestoreIssues related to the Firestore API.Issues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.