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
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 |
↳ entity_result_type |
int
The result type for every entity in |
↳ entity_results |
array<Google\Cloud\Datastore\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 |
↳ read_time |
Google\Protobuf\Timestamp
Read timestamp this batch was returned from. This applies to the range of results from the query's |
getSkippedResults
The number of results skipped, typically because of an offset.
Generated from protobuf field int32 skipped_results = 6;
Returns | |
---|---|
Type | Description |
int |
setSkippedResults
The number of results skipped, typically because of an offset.
Generated from protobuf field int32 skipped_results = 6;
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.
Generated from protobuf field bytes skipped_cursor = 3;
Returns | |
---|---|
Type | Description |
string |
setSkippedCursor
A cursor that points to the position after the last skipped result.
Will be set when skipped_results
!= 0.
Generated from protobuf field bytes skipped_cursor = 3;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getEntityResultType
The result type for every entity in entity_results
.
Generated from protobuf field .google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
Returns | |
---|---|
Type | Description |
int |
setEntityResultType
The result type for every entity in entity_results
.
Generated from protobuf field .google.datastore.v1.EntityResult.ResultType entity_result_type = 1;
Parameter | |
---|---|
Name | Description |
var |
int
|
Returns | |
---|---|
Type | Description |
$this |
getEntityResults
The results for this batch.
Generated from protobuf field repeated .google.datastore.v1.EntityResult entity_results = 2;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Internal\RepeatedField |
setEntityResults
The results for this batch.
Generated from protobuf field repeated .google.datastore.v1.EntityResult entity_results = 2;
Parameter | |
---|---|
Name | Description |
var |
array<Google\Cloud\Datastore\V1\EntityResult>
|
Returns | |
---|---|
Type | Description |
$this |
getEndCursor
A cursor that points to the position after the last result in the batch.
Generated from protobuf field bytes end_cursor = 4;
Returns | |
---|---|
Type | Description |
string |
setEndCursor
A cursor that points to the position after the last result in the batch.
Generated from protobuf field bytes end_cursor = 4;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |
getMoreResults
The state of the query after the current batch.
Generated from protobuf field .google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
Returns | |
---|---|
Type | Description |
int |
setMoreResults
The state of the query after the current batch.
Generated from protobuf field .google.datastore.v1.QueryResultBatch.MoreResultsType more_results = 5;
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'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.
Generated from protobuf field int64 snapshot_version = 7;
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.
Generated from protobuf field int64 snapshot_version = 7;
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.
Generated from protobuf field .google.protobuf.Timestamp read_time = 8;
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.
Generated from protobuf field .google.protobuf.Timestamp read_time = 8;
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |