public static final class Mutation.Builder extends GeneratedMessageV3.Builder<Mutation.Builder> implements MutationOrBuilder
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.
Protobuf type google.spanner.v1.Mutation
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Mutation.BuilderImplements
MutationOrBuilderMethods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Mutation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Mutation.Builder |
build()
public Mutation build()
Type | Description |
Mutation |
buildPartial()
public Mutation buildPartial()
Type | Description |
Mutation |
clear()
public Mutation.Builder clear()
Type | Description |
Mutation.Builder |
clearDelete()
public Mutation.Builder clearDelete()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Type | Description |
Mutation.Builder |
clearField(Descriptors.FieldDescriptor field)
public Mutation.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
Mutation.Builder |
clearInsert()
public Mutation.Builder clearInsert()
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Type | Description |
Mutation.Builder |
clearInsertOrUpdate()
public Mutation.Builder clearInsertOrUpdate()
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Type | Description |
Mutation.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Mutation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
Mutation.Builder |
clearOperation()
public Mutation.Builder clearOperation()
Type | Description |
Mutation.Builder |
clearReplace()
public Mutation.Builder clearReplace()
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Type | Description |
Mutation.Builder |
clearUpdate()
public Mutation.Builder clearUpdate()
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Type | Description |
Mutation.Builder |
clone()
public Mutation.Builder clone()
Type | Description |
Mutation.Builder |
getDefaultInstanceForType()
public Mutation getDefaultInstanceForType()
Type | Description |
Mutation |
getDelete()
public Mutation.Delete getDelete()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Type | Description |
Mutation.Delete | The delete. |
getDeleteBuilder()
public Mutation.Delete.Builder getDeleteBuilder()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Type | Description |
Mutation.Delete.Builder |
getDeleteOrBuilder()
public Mutation.DeleteOrBuilder getDeleteOrBuilder()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Type | Description |
Mutation.DeleteOrBuilder |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getInsert()
public 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
.
.google.spanner.v1.Mutation.Write insert = 1;
Type | Description |
Mutation.Write | The insert. |
getInsertBuilder()
public Mutation.Write.Builder getInsertBuilder()
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Type | Description |
Mutation.Write.Builder |
getInsertOrBuilder()
public Mutation.WriteOrBuilder getInsertOrBuilder()
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Type | Description |
Mutation.WriteOrBuilder |
getInsertOrUpdate()
public Mutation.Write getInsertOrUpdate()
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Type | Description |
Mutation.Write | The insertOrUpdate. |
getInsertOrUpdateBuilder()
public Mutation.Write.Builder getInsertOrUpdateBuilder()
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Type | Description |
Mutation.Write.Builder |
getInsertOrUpdateOrBuilder()
public Mutation.WriteOrBuilder getInsertOrUpdateOrBuilder()
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Type | Description |
Mutation.WriteOrBuilder |
getOperationCase()
public Mutation.OperationCase getOperationCase()
Type | Description |
Mutation.OperationCase |
getReplace()
public Mutation.Write getReplace()
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Type | Description |
Mutation.Write | The replace. |
getReplaceBuilder()
public Mutation.Write.Builder getReplaceBuilder()
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Type | Description |
Mutation.Write.Builder |
getReplaceOrBuilder()
public Mutation.WriteOrBuilder getReplaceOrBuilder()
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Type | Description |
Mutation.WriteOrBuilder |
getUpdate()
public 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
.
.google.spanner.v1.Mutation.Write update = 2;
Type | Description |
Mutation.Write | The update. |
getUpdateBuilder()
public Mutation.Write.Builder getUpdateBuilder()
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Type | Description |
Mutation.Write.Builder |
getUpdateOrBuilder()
public Mutation.WriteOrBuilder getUpdateOrBuilder()
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Type | Description |
Mutation.WriteOrBuilder |
hasDelete()
public boolean hasDelete()
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Type | Description |
boolean | Whether the delete field is set. |
hasInsert()
public boolean hasInsert()
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Type | Description |
boolean | Whether the insert field is set. |
hasInsertOrUpdate()
public boolean hasInsertOrUpdate()
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Type | Description |
boolean | Whether the insertOrUpdate field is set. |
hasReplace()
public boolean hasReplace()
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Type | Description |
boolean | Whether the replace field is set. |
hasUpdate()
public boolean hasUpdate()
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Type | Description |
boolean | Whether the update field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeDelete(Mutation.Delete value)
public Mutation.Builder mergeDelete(Mutation.Delete value)
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Name | Description |
value | Mutation.Delete |
Type | Description |
Mutation.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Mutation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
Mutation.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public Mutation.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
Mutation.Builder |
mergeFrom(Mutation other)
public Mutation.Builder mergeFrom(Mutation other)
Name | Description |
other | Mutation |
Type | Description |
Mutation.Builder |
mergeInsert(Mutation.Write value)
public Mutation.Builder mergeInsert(Mutation.Write value)
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
mergeInsertOrUpdate(Mutation.Write value)
public Mutation.Builder mergeInsertOrUpdate(Mutation.Write value)
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
mergeReplace(Mutation.Write value)
public Mutation.Builder mergeReplace(Mutation.Write value)
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Mutation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Mutation.Builder |
mergeUpdate(Mutation.Write value)
public Mutation.Builder mergeUpdate(Mutation.Write value)
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
setDelete(Mutation.Delete value)
public Mutation.Builder setDelete(Mutation.Delete value)
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Name | Description |
value | Mutation.Delete |
Type | Description |
Mutation.Builder |
setDelete(Mutation.Delete.Builder builderForValue)
public Mutation.Builder setDelete(Mutation.Delete.Builder builderForValue)
Delete rows from a table. Succeeds whether or not the named rows were present.
.google.spanner.v1.Mutation.Delete delete = 5;
Name | Description |
builderForValue | Mutation.Delete.Builder |
Type | Description |
Mutation.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Mutation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
Mutation.Builder |
setInsert(Mutation.Write value)
public Mutation.Builder setInsert(Mutation.Write value)
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
setInsert(Mutation.Write.Builder builderForValue)
public Mutation.Builder setInsert(Mutation.Write.Builder builderForValue)
Insert new rows in a table. If any of the rows already exist,
the write or transaction fails with error ALREADY_EXISTS
.
.google.spanner.v1.Mutation.Write insert = 1;
Name | Description |
builderForValue | Mutation.Write.Builder |
Type | Description |
Mutation.Builder |
setInsertOrUpdate(Mutation.Write value)
public Mutation.Builder setInsertOrUpdate(Mutation.Write value)
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
setInsertOrUpdate(Mutation.Write.Builder builderForValue)
public Mutation.Builder setInsertOrUpdate(Mutation.Write.Builder builderForValue)
Like 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.
When using insert_or_update, just as when using insert, all NOT
NULL
columns in the table must be given a value. This holds true
even when the row already exists and will therefore actually be updated.
.google.spanner.v1.Mutation.Write insert_or_update = 3;
Name | Description |
builderForValue | Mutation.Write.Builder |
Type | Description |
Mutation.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Mutation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
Mutation.Builder |
setReplace(Mutation.Write value)
public Mutation.Builder setReplace(Mutation.Write value)
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
setReplace(Mutation.Write.Builder builderForValue)
public Mutation.Builder setReplace(Mutation.Write.Builder builderForValue)
Like insert, except that if the row already exists, it is
deleted, and the column values provided are inserted
instead. Unlike insert_or_update, this means any values not
explicitly written become NULL
.
In an interleaved table, if you create the child table with the
ON DELETE CASCADE
annotation, then replacing a parent row
also deletes the child rows. Otherwise, you must delete the
child rows before you replace the parent row.
.google.spanner.v1.Mutation.Write replace = 4;
Name | Description |
builderForValue | Mutation.Write.Builder |
Type | Description |
Mutation.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Mutation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
Mutation.Builder |
setUpdate(Mutation.Write value)
public Mutation.Builder setUpdate(Mutation.Write value)
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Name | Description |
value | Mutation.Write |
Type | Description |
Mutation.Builder |
setUpdate(Mutation.Write.Builder builderForValue)
public Mutation.Builder setUpdate(Mutation.Write.Builder builderForValue)
Update existing rows in a table. If any of the rows does not
already exist, the transaction fails with error NOT_FOUND
.
.google.spanner.v1.Mutation.Write update = 2;
Name | Description |
builderForValue | Mutation.Write.Builder |
Type | Description |
Mutation.Builder |