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'sstart_cursor(or the beginning of the query if no cursor was given) to this batch'send_cursor(not the query'send_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 timestamp this batch was returned from. This applies to the range of results from the query'sstart_cursor(or the beginning of the query if no cursor was given) to this batch'send_cursor(not the query'send_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 whenskipped_results!= 0.
Returns
Type
Description
string
setSkippedCursor
A cursor that points to the position after the last skipped result.
Will be set whenskipped_results!= 0.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getEntityResultType
The result type for every entity inentity_results.
Returns
Type
Description
int
setEntityResultType
The result type for every entity inentity_results.
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
setMoreResults
The state of the query after the current batch.
Parameter
Name
Description
var
int
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'sstart_cursor(or
the beginning of the query if no cursor was given) to this batch'send_cursor(not the query'send_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'sstart_cursor(or
the beginning of the query if no cursor was given) to this batch'send_cursor(not the query'send_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'sstart_cursor(or
the beginning of the query if no cursor was given) to this batch'send_cursor(not the query'send_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.
This applies to the range of results from the query'sstart_cursor(or
the beginning of the query if no cursor was given) to this batch'send_cursor(not the query'send_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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Datastore V1 Client - Class QueryResultBatch (1.33.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.33.1 (latest)](/php/docs/reference/cloud-datastore/latest/V1.QueryResultBatch)\n- [1.33.0](/php/docs/reference/cloud-datastore/1.33.0/V1.QueryResultBatch)\n- [1.32.3](/php/docs/reference/cloud-datastore/1.32.3/V1.QueryResultBatch)\n- [1.31.0](/php/docs/reference/cloud-datastore/1.31.0/V1.QueryResultBatch)\n- [1.30.0](/php/docs/reference/cloud-datastore/1.30.0/V1.QueryResultBatch)\n- [1.29.2](/php/docs/reference/cloud-datastore/1.29.2/V1.QueryResultBatch)\n- [1.28.2](/php/docs/reference/cloud-datastore/1.28.2/V1.QueryResultBatch)\n- [1.26.0](/php/docs/reference/cloud-datastore/1.26.0/V1.QueryResultBatch)\n- [1.25.0](/php/docs/reference/cloud-datastore/1.25.0/V1.QueryResultBatch)\n- [1.24.4](/php/docs/reference/cloud-datastore/1.24.4/V1.QueryResultBatch)\n- [1.23.0](/php/docs/reference/cloud-datastore/1.23.0/V1.QueryResultBatch)\n- [1.22.1](/php/docs/reference/cloud-datastore/1.22.1/V1.QueryResultBatch)\n- [1.21.2](/php/docs/reference/cloud-datastore/1.21.2/V1.QueryResultBatch)\n- [1.19.0](/php/docs/reference/cloud-datastore/1.19.0/V1.QueryResultBatch)\n- [1.18.1](/php/docs/reference/cloud-datastore/1.18.1/V1.QueryResultBatch)\n- [1.17.1](/php/docs/reference/cloud-datastore/1.17.1/V1.QueryResultBatch) \nReference documentation and code samples for the Cloud Datastore V1 Client class QueryResultBatch.\n\nA batch of results produced by a query.\n\nGenerated from protobuf message `google.datastore.v1.QueryResultBatch`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Datastore \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getSkippedResults\n\nThe number of results skipped, typically because of an offset.\n\n### setSkippedResults\n\nThe number of results skipped, typically because of an offset.\n\n### getSkippedCursor\n\nA cursor that points to the position after the last skipped result.\n\nWill be set when `skipped_results` != 0.\n\n### setSkippedCursor\n\nA cursor that points to the position after the last skipped result.\n\nWill be set when `skipped_results` != 0.\n\n### getEntityResultType\n\nThe result type for every entity in `entity_results`.\n\n### setEntityResultType\n\nThe result type for every entity in `entity_results`.\n\n### getEntityResults\n\nThe results for this batch.\n\n### setEntityResults\n\nThe results for this batch.\n\n### getEndCursor\n\nA cursor that points to the position after the last result in the batch.\n\n### setEndCursor\n\nA cursor that points to the position after the last result in the batch.\n\n### getMoreResults\n\nThe state of the query after the current batch.\n\n### setMoreResults\n\nThe state of the query after the current batch.\n\n### getSnapshotVersion\n\nThe version number of the snapshot this batch was returned from.\n\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.\n\n### setSnapshotVersion\n\nThe version number of the snapshot this batch was returned from.\n\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater snapshot version number. Each batch's snapshot version\nis valid for all preceding batches.\nThe value will be zero for eventually consistent queries.\n\n### getReadTime\n\nRead timestamp this batch was returned from.\n\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater timestamp. Each batch's read timestamp\nis valid for all preceding batches.\nThis value will not be set for eventually consistent queries in Cloud\nDatastore.\n\n### hasReadTime\n\n### clearReadTime\n\n### setReadTime\n\nRead timestamp this batch was returned from.\n\nThis applies to the range of results from the query's `start_cursor` (or\nthe beginning of the query if no cursor was given) to this batch's\n`end_cursor` (not the query's `end_cursor`).\nIn a single transaction, subsequent query result batches for the same query\ncan have a greater timestamp. Each batch's read timestamp\nis valid for all preceding batches.\nThis value will not be set for eventually consistent queries in Cloud\nDatastore."]]