Module base_query

Classes for representing queries for the Google Cloud Firestore API.

A Query can be created directly from a Collection and that can be a more common way to create a query than direct usage of the constructor.

Classes

BaseCollectionGroup

BaseCollectionGroup(
    parent,
    projection=None,
    field_filters=(),
    orders=(),
    limit=None,
    limit_to_last=False,
    offset=None,
    start_at=None,
    end_at=None,
    all_descendants=True,
    recursive=False,
)

Represents a Collection Group in the Firestore API.

This is a specialization of .Query that includes all documents in the database that are contained in a collection or subcollection of the given parent.

BaseQuery

BaseQuery(
    parent,
    projection=None,
    field_filters=(),
    orders=(),
    limit=None,
    limit_to_last=False,
    offset=None,
    start_at=None,
    end_at=None,
    all_descendants=False,
    recursive=False,
)

Represents a query to the Firestore API.

Instances of this class are considered immutable: all methods that would modify an instance instead return a new instance.

QueryPartition

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.