Skip to content

Firestore: 'Query.start_at' etc. should accept a list of values for 'document_fields'. #6664

@tseaver

Description

@tseaver

Currently, the "cursor-related" methods (Query.start_at, Query.start_after, Query.end_before, Query.end_at) expect their document_fields argument to be either a DocumentSnapshot instance or a dict, where the fields in either are used to compute the actual values for the cursor, using the query's order_by fields.

However, the cross-language conformance tests also expect to be able to pass a raw sequence of values for document_fields, which are then used to match the query's order_by. We need to update the docstrings for these methods to indicate that a list is allowed, and fix the query._cursor_pb helper to deal with that case.

The corresponding Collection methods also need their docstrings adjusted (they just forward arguments through to a new query object).

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions