class Mutation extends Message

A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a [Commit][google.spanner.v1.Spanner.Commit] call.

Protobuf type Google\Spanner\V1\Mutation

Properties

protected $operation

Methods

__construct()

No description

getInsert()

Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error ALREADY_EXISTS.

setInsert(Mutation_Write $var)

Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error ALREADY_EXISTS.

getUpdate()

Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error NOT_FOUND.

setUpdate(Mutation_Write $var)

Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error NOT_FOUND.

getInsertOrUpdate()

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved.

setInsertOrUpdate(Mutation_Write $var)

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved.

getReplace()

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is deleted, and the column values provided are inserted instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not explicitly written become NULL.

setReplace(Mutation_Write $var)

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is deleted, and the column values provided are inserted instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not explicitly written become NULL.

getDelete()

Delete rows from a table. Succeeds whether or not the named rows were present.

setDelete(Mutation_Delete $var)

Delete rows from a table. Succeeds whether or not the named rows were present.

string
getOperation()

No description

Details

at line 22
__construct()

at line 34
Mutation_Write getInsert()

Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error ALREADY_EXISTS.

Generated from protobuf field .google.spanner.v1.Mutation.Write insert = 1;

Return Value

Mutation_Write

at line 46
setInsert(Mutation_Write $var)

Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error ALREADY_EXISTS.

Generated from protobuf field .google.spanner.v1.Mutation.Write insert = 1;

Parameters

Mutation_Write $var

at line 59
Mutation_Write getUpdate()

Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error NOT_FOUND.

Generated from protobuf field .google.spanner.v1.Mutation.Write update = 2;

Return Value

Mutation_Write

at line 71
setUpdate(Mutation_Write $var)

Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error NOT_FOUND.

Generated from protobuf field .google.spanner.v1.Mutation.Write update = 2;

Parameters

Mutation_Write $var

at line 85
Mutation_Write getInsertOrUpdate()

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved.

Generated from protobuf field .google.spanner.v1.Mutation.Write insert_or_update = 3;

Return Value

Mutation_Write

at line 98
setInsertOrUpdate(Mutation_Write $var)

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved.

Generated from protobuf field .google.spanner.v1.Mutation.Write insert_or_update = 3;

Parameters

Mutation_Write $var

at line 113
Mutation_Write getReplace()

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is deleted, and the column values provided are inserted instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not explicitly written become NULL.

Generated from protobuf field .google.spanner.v1.Mutation.Write replace = 4;

Return Value

Mutation_Write

at line 127
setReplace(Mutation_Write $var)

Like [insert][google.spanner.v1.Mutation.insert], except that if the row already exists, it is deleted, and the column values provided are inserted instead. Unlike [insert_or_update][google.spanner.v1.Mutation.insert_or_update], this means any values not explicitly written become NULL.

Generated from protobuf field .google.spanner.v1.Mutation.Write replace = 4;

Parameters

Mutation_Write $var

at line 140
Mutation_Delete getDelete()

Delete rows from a table. Succeeds whether or not the named rows were present.

Generated from protobuf field .google.spanner.v1.Mutation.Delete delete = 5;

Return Value

Mutation_Delete

at line 152
setDelete(Mutation_Delete $var)

Delete rows from a table. Succeeds whether or not the named rows were present.

Generated from protobuf field .google.spanner.v1.Mutation.Delete delete = 5;

Parameters

Mutation_Delete $var

at line 161
string getOperation()

Return Value

string