2.2.0 (latest) 2.0.6 1.34.2 1.33.1 1.32.3 1.31.0 1.30.0 1.29.2 1.28.2 1.26.0 1.25.0 1.24.4 1.23.0 1.22.1 1.21.2 1.19.0 1.18.1 1.17.1 Reference documentation and code samples for the Cloud Datastore V1 Client class AggregationResultBatch.

A batch of aggregation results produced by an aggregation query.

Generated from protobuf message `google.datastore.v1.AggregationResultBatch`

## Namespace

Google \\ Cloud \\ Datastore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ aggregation_results` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.AggregationResult>` The aggregation results for this batch. |
| `↳ more_results` | `int` The state of the query after the current batch. Only COUNT(\*) aggregations are supported in the initial launch. Therefore, expected result type is limited to `NO_MORE_RESULTS`. |
| `↳ read_time` | `Google\Protobuf\Timestamp` Read timestamp this batch was returned from. In a single transaction, subsequent query result batches for the same query can have a greater timestamp. Each batch's read timestamp is valid for all preceding batches. |

### getAggregationResults

The aggregation results for this batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.AggregationResult>` |   |

### setAggregationResults

The aggregation results for this batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.AggregationResult>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMoreResults

The state of the query after the current batch.

Only COUNT(\*) aggregations are supported in the initial launch. Therefore,
expected result type is limited to `NO_MORE_RESULTS`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [MoreResultsType](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.QueryResultBatch.MoreResultsType). |

### setMoreResults

The state of the query after the current batch.

Only COUNT(\*) aggregations are supported in the initial launch. Therefore,
expected result type is limited to `NO_MORE_RESULTS`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [MoreResultsType](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.QueryResultBatch.MoreResultsType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getReadTime

Read timestamp this batch was returned from.

In a single transaction, subsequent query result batches for the same query
can have a greater timestamp. Each batch's read timestamp
is valid for all preceding batches.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasReadTime

### clearReadTime

### setReadTime

Read timestamp this batch was returned from.

In a single transaction, subsequent query result batches for the same query
can have a greater timestamp. Each batch's read timestamp
is valid for all preceding batches.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |