# Class QueryPartition (2.27.0)

2.27.0 (latest) 2.26.0 2.23.0 2.22.0 2.21.0 2.20.2 2.19.0 2.18.0 2.17.2 2.16.1 2.15.0 2.14.0 2.13.1 2.12.0 2.11.1 2.10.1 2.9.1 2.8.0 2.7.3 2.6.1 2.5.3 2.4.0 2.3.4 2.2.0 2.1.3 2.0.2 1.9.2 1.8.1 1.7.0 1.6.2 1.5.0 1.4.0 1.3.0

    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 ||
|---|---|
| **Name** | **Description** |
| `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** ||
|---|---|
| **Type** | **Description** |
| `BaseQuery` | Copy of the original query with start and end bounds set by the cursors from this partition. |