Cloud Datastore V1 Client - Class Mutation (1.26.0)

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

Namespace

Google \ Cloud \ Datastore \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
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.

Returns
Type
Description

hasInsert

setInsert

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

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

Parameter
Name
Description
Returns
Type
Description
$this

getUpdate

The entity to update. The entity must already exist.

Must have a complete key path.

Returns
Type
Description

hasUpdate

setUpdate

The entity to update. The entity must already exist.

Must have a complete key path.

Parameter
Name
Description
Returns
Type
Description
$this

getUpsert

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

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

Returns
Type
Description

hasUpsert

setUpsert

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

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

Parameter
Name
Description
Returns
Type
Description
$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.

Returns
Type
Description

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.

Parameter
Name
Description
Returns
Type
Description
$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.

Returns
Type
Description
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.

Parameter
Name
Description
var
int|string
Returns
Type
Description
$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.

Returns
Type
Description

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.

Parameter
Name
Description
Returns
Type
Description
$this

getOperation

Returns
Type
Description
string

getConflictDetectionStrategy

Returns
Type
Description
string
Create a Mobile Website
View Site in Mobile | Classic
Share by: