Cloud Datastore V1 Client - Class EntityResult (1.26.0)

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

Namespace

Google \ Cloud \ Datastore \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
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 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.

↳ create_time Google\Protobuf\Timestamp

The time at which the entity was created. This field is set for FULL entity results. If this entity is missing, this field will not be set.

↳ update_time Google\Protobuf\Timestamp

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.

↳ cursor string

A cursor that points to the position after the result entity. Set only when the EntityResult is part of a QueryResultBatch message.

getEntity

The resulting entity.

Returns
TypeDescription
Google\Cloud\Datastore\V1\Entity|null

hasEntity

clearEntity

setEntity

The resulting entity.

Parameter
NameDescription
var Google\Cloud\Datastore\V1\Entity
Returns
TypeDescription
$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.

Returns
TypeDescription
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.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getCreateTime

The time at which the entity was created.

This field is set for FULL entity results. If this entity is missing, this field will not be set.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

The time at which the entity was created.

This field is set for FULL entity results. If this entity is missing, this field will not be set.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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.

Returns
TypeDescription
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.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getCursor

A cursor that points to the position after the result entity.

Set only when the EntityResult is part of a QueryResultBatch message.

Returns
TypeDescription
string

setCursor

A cursor that points to the position after the result entity.

Set only when the EntityResult is part of a QueryResultBatch message.

Parameter
NameDescription
var string
Returns
TypeDescription
$this