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 QueryResultBatch.

A batch of results produced by a query.

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

## Namespace

Google \\ Cloud \\ Datastore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ skipped_results` | `int` The number of results skipped, typically because of an offset. |
| `↳ skipped_cursor` | `string` A cursor that points to the position after the last skipped result. Will be set when `skipped_results` != 0. |
| `↳ entity_result_type` | `int` The result type for every entity in `entity_results`. |
| `↳ entity_results` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult>` The results for this batch. |
| `↳ end_cursor` | `string` A cursor that points to the position after the last result in the batch. |
| `↳ more_results` | `int` The state of the query after the current batch. |
| `↳ snapshot_version` | `int|string` The version number of the snapshot this batch was returned from. This applies to the range of results from the query's `start_cursor` (or the beginning of the query if no cursor was given) to this batch's `end_cursor` (not the query's `end_cursor`). In a single transaction, subsequent query result batches for the same query can have a greater snapshot version number. Each batch's snapshot version is valid for all preceding batches. The value will be zero for eventually consistent queries. |
| `↳ read_time` | `Google\Protobuf\Timestamp` Read timestamp this batch was returned from. This applies to the range of results from the query's `start_cursor` (or the beginning of the query if no cursor was given) to this batch's `end_cursor` (not the query's `end_cursor`). 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. This value will not be set for eventually consistent queries in Cloud Datastore. |

### getSkippedResults

The number of results skipped, typically because of an offset.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setSkippedResults

The number of results skipped, typically because of an offset.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

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

### getSkippedCursor

A cursor that points to the position after the last skipped result.

Will be set when `skipped_results` != 0.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSkippedCursor

A cursor that points to the position after the last skipped result.

Will be set when `skipped_results` != 0.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getEntityResultType

The result type for every entity in `entity_results`.

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

### setEntityResultType

The result type for every entity in `entity_results`.

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

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

### getEntityResults

The results for this batch.

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

### setEntityResults

The results for this batch.

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

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

### getEndCursor

A cursor that points to the position after the last result in the batch.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setEndCursor

A cursor that points to the position after the last result in the batch.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getMoreResults

The state of the query after the current batch.

| **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.

| **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` |   |

### getSnapshotVersion

The version number of the snapshot this batch was returned from.

This applies to the range of results from the query's `start_cursor` (or
the beginning of the query if no cursor was given) to this batch's
`end_cursor` (not the query's `end_cursor`).
In a single transaction, subsequent query result batches for the same query
can have a greater snapshot version number. Each batch's snapshot version
is valid for all preceding batches.
The value will be zero for eventually consistent queries.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|string` |   |

### setSnapshotVersion

The version number of the snapshot this batch was returned from.

This applies to the range of results from the query's `start_cursor` (or
the beginning of the query if no cursor was given) to this batch's
`end_cursor` (not the query's `end_cursor`).
In a single transaction, subsequent query result batches for the same query
can have a greater snapshot version number. Each batch's snapshot version
is valid for all preceding batches.
The value will be zero for eventually consistent queries.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|string` |

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

### getReadTime

Read timestamp this batch was returned from.

This applies to the range of results from the query's `start_cursor` (or
the beginning of the query if no cursor was given) to this batch's
`end_cursor` (not the query's `end_cursor`).
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.
This value will not be set for eventually consistent queries in Cloud
Datastore.

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

### hasReadTime

### clearReadTime

### setReadTime

Read timestamp this batch was returned from.

This applies to the range of results from the query's `start_cursor` (or
the beginning of the query if no cursor was given) to this batch's
`end_cursor` (not the query's `end_cursor`).
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.
This value will not be set for eventually consistent queries in Cloud
Datastore.

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

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