Reference documentation and code samples for the Cloud Datastore V1 Client class EntityResult.
The result of fetching an entity from Datastore.
Generated from protobuf message google.datastore.v1.EntityResult
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ entity |
Google\Cloud\Datastore\V1\Entity
The resulting entity. |
↳ version |
int|string
The version of the entity, a strictly positive number that monotonically increases with changes to the entity. This field is set for |
↳ update_time |
Google\Protobuf\Timestamp
The time at which the entity was last changed. This field is set for |
↳ cursor |
string
A cursor that points to the position after the result entity. Set only when the |
getEntity
The resulting entity.
Generated from protobuf field .google.datastore.v1.Entity entity = 1;
Returns | |
---|---|
Type | Description |
Google\Cloud\Datastore\V1\Entity|null |
hasEntity
clearEntity
setEntity
The resulting entity.
Generated from protobuf field .google.datastore.v1.Entity entity = 1;
Parameter | |
---|---|
Name | Description |
var |
Google\Cloud\Datastore\V1\Entity
|
Returns | |
---|---|
Type | Description |
$this |
getVersion
The version of the entity, a strictly positive number that monotonically increases with changes to the entity.
This field is set for FULL
entity
results.
For missing entities in LookupResponse
, this
is the version of the snapshot that was used to look up the entity, and it
is always set except for eventually consistent reads.
Generated from protobuf field int64 version = 4;
Returns | |
---|---|
Type | Description |
int|string |
setVersion
The version of the entity, a strictly positive number that monotonically increases with changes to the entity.
This field is set for FULL
entity
results.
For missing entities in LookupResponse
, this
is the version of the snapshot that was used to look up the entity, and it
is always set except for eventually consistent reads.
Generated from protobuf field int64 version = 4;
Parameter | |
---|---|
Name | Description |
var |
int|string
|
Returns | |
---|---|
Type | Description |
$this |
getUpdateTime
The time at which the entity was last changed.
This field is set for FULL
entity
results.
If this entity is missing, this field will not be set.
Generated from protobuf field .google.protobuf.Timestamp update_time = 5;
Returns | |
---|---|
Type | Description |
Google\Protobuf\Timestamp|null |
hasUpdateTime
clearUpdateTime
setUpdateTime
The time at which the entity was last changed.
This field is set for FULL
entity
results.
If this entity is missing, this field will not be set.
Generated from protobuf field .google.protobuf.Timestamp update_time = 5;
Parameter | |
---|---|
Name | Description |
var |
Google\Protobuf\Timestamp
|
Returns | |
---|---|
Type | Description |
$this |
getCursor
A cursor that points to the position after the result entity.
Set only when the EntityResult
is part of a QueryResultBatch
message.
Generated from protobuf field bytes cursor = 3;
Returns | |
---|---|
Type | Description |
string |
setCursor
A cursor that points to the position after the result entity.
Set only when the EntityResult
is part of a QueryResultBatch
message.
Generated from protobuf field bytes cursor = 3;
Parameter | |
---|---|
Name | Description |
var |
string
|
Returns | |
---|---|
Type | Description |
$this |