A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a Commit call.
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field operation. Required. The operation to perform. operation can be only one of the following: |
|
insert |
Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error |
update |
Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error |
insertOrUpdate |
Like When using |
replace |
Like In an interleaved table, if you create the child table with the |
delete |
Delete rows from a table. Succeeds whether or not the named rows were present. |
Write
Arguments to insert, update, insertOrUpdate, and replace operations.
| JSON representation |
|---|
{ "table": string, "columns": [ string ], "values": [ array ] } |
| Fields | |
|---|---|
table |
Required. The table whose rows will be written. |
columns[] |
The names of the columns in The list of columns must contain enough columns to allow Cloud Spanner to derive values for all primary key columns in the row(s) to be modified. |
values[] |
The values to be written. |
Delete
Arguments to delete operations.
| JSON representation |
|---|
{
"table": string,
"keySet": {
object ( |
| Fields | |
|---|---|
table |
Required. The table whose rows will be deleted. |
keySet |
Required. The primary keys of the rows within |