Cloud Datastore V1 Client - Class MutationResult (1.17.1)

Reference documentation and code samples for the Cloud Datastore V1 Client class MutationResult.

The result of applying a mutation.

Generated from protobuf message google.datastore.v1.MutationResult

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ key Google\Cloud\Datastore\V1\Key

The automatically allocated key. Set only when the mutation allocated a key.

↳ version int|string

The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.

↳ update_time Google\Protobuf\Timestamp

The update time of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'.

↳ conflict_detected bool

Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.

getKey

The automatically allocated key.

Set only when the mutation allocated a key.

Generated from protobuf field .google.datastore.v1.Key key = 3;

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

hasKey

clearKey

setKey

The automatically allocated key.

Set only when the mutation allocated a key.

Generated from protobuf field .google.datastore.v1.Key key = 3;

Parameter
NameDescription
var Google\Cloud\Datastore\V1\Key
Returns
TypeDescription
$this

getVersion

The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.

Generated from protobuf field int64 version = 4;

Returns
TypeDescription
int|string

setVersion

The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity.

Generated from protobuf field int64 version = 4;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getUpdateTime

The update time of the entity on the server after processing the mutation.

If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'.

Generated from protobuf field .google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

The update time of the entity on the server after processing the mutation.

If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'.

Generated from protobuf field .google.protobuf.Timestamp update_time = 6;

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

getConflictDetected

Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.

Generated from protobuf field bool conflict_detected = 5;

Returns
TypeDescription
bool

setConflictDetected

Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation.

Generated from protobuf field bool conflict_detected = 5;

Parameter
NameDescription
var bool
Returns
TypeDescription
$this