Cloud Datastore V1 Client - Class Mutation (1.17.1)

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

A mutation to apply to an entity.

Generated from protobuf message google.datastore.v1.Mutation

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ insert Google\Cloud\Datastore\V1\Entity

The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.

↳ update Google\Cloud\Datastore\V1\Entity

The entity to update. The entity must already exist. Must have a complete key path.

↳ upsert Google\Cloud\Datastore\V1\Entity

The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.

↳ delete Google\Cloud\Datastore\V1\Key

The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.

↳ base_version int|string

The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.

↳ update_time Google\Protobuf\Timestamp

The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.

getInsert

The entity to insert. The entity must not already exist.

The entity key's final path element may be incomplete.

Generated from protobuf field .google.datastore.v1.Entity insert = 4;

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

hasInsert

setInsert

The entity to insert. The entity must not already exist.

The entity key's final path element may be incomplete.

Generated from protobuf field .google.datastore.v1.Entity insert = 4;

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

getUpdate

The entity to update. The entity must already exist.

Must have a complete key path.

Generated from protobuf field .google.datastore.v1.Entity update = 5;

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

hasUpdate

setUpdate

The entity to update. The entity must already exist.

Must have a complete key path.

Generated from protobuf field .google.datastore.v1.Entity update = 5;

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

getUpsert

The entity to upsert. The entity may or may not already exist.

The entity key's final path element may be incomplete.

Generated from protobuf field .google.datastore.v1.Entity upsert = 6;

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

hasUpsert

setUpsert

The entity to upsert. The entity may or may not already exist.

The entity key's final path element may be incomplete.

Generated from protobuf field .google.datastore.v1.Entity upsert = 6;

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

getDelete

The key of the entity to delete. The entity may or may not already exist.

Must have a complete key path and must not be reserved/read-only.

Generated from protobuf field .google.datastore.v1.Key delete = 7;

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

hasDelete

setDelete

The key of the entity to delete. The entity may or may not already exist.

Must have a complete key path and must not be reserved/read-only.

Generated from protobuf field .google.datastore.v1.Key delete = 7;

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

getBaseVersion

The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.

Generated from protobuf field int64 base_version = 8;

Returns
TypeDescription
int|string

hasBaseVersion

setBaseVersion

The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.

Generated from protobuf field int64 base_version = 8;

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getUpdateTime

The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.

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

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

setUpdateTime

The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.

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

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

getOperation

Returns
TypeDescription
string

getConflictDetectionStrategy

Returns
TypeDescription
string