Class QueryPartition (2.10.1)

QueryPartition(query, start_at, end_at)

Represents a bounded partition of a collection group query.

Contains cursors that can be used in a query as a starting and/or end point for the collection group query. The cursors may only be used in a query that matches the constraints of the query that produced this partition.

Parameters

NameDescription
query BaseQuery

The original query that this is a partition of.

start_at Optional[DocumentSnapshot]

Cursor for first query result to include. If None, the partition starts at the beginning of the result set.

end_at Optional[DocumentSnapshot]

Cursor for first query result after the last result included in the partition. If None, the partition runs to the end of the result set.

Methods

query

query()

Generate a new query using this partition's bounds.

Returns
TypeDescription
BaseQueryCopy of the original query with start and end bounds set by the cursors from this partition.