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
MutationOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Mutation.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
build()
public Mutation build()
Returns | |
---|---|
Type | Description |
Mutation |
buildPartial()
public Mutation buildPartial()
Returns | |
---|---|
Type | Description |
Mutation |
clear()
public Mutation.Builder clear()
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
Mutation.Builder |
clearField(Descriptors.FieldDescriptor field)
public Mutation.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
Mutation.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public Mutation.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
clearOperation()
public Mutation.Builder clearOperation()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
Mutation.Builder |
clone()
public Mutation.Builder clone()
Returns | |
---|---|
Type | Description |
Mutation.Builder |
getDefaultInstanceForType()
public Mutation getDefaultInstanceForType()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
Mutation.DeleteOrBuilder |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
Mutation.WriteOrBuilder |
getOperationCase()
public Mutation.OperationCase getOperationCase()
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
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;
Returns | |
---|---|
Type | Description |
boolean | Whether the update field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Delete |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Mutation.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public Mutation.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
mergeFrom(Mutation other)
public Mutation.Builder mergeFrom(Mutation other)
Parameter | |
---|---|
Name | Description |
other | Mutation |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Mutation.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Delete |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue | Mutation.Delete.Builder |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public Mutation.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue | Mutation.Write.Builder |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue | Mutation.Write.Builder |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Mutation.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue | Mutation.Write.Builder |
Returns | |
---|---|
Type | Description |
Mutation.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final Mutation.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
value | Mutation.Write |
Returns | |
---|---|
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;
Parameter | |
---|---|
Name | Description |
builderForValue | Mutation.Write.Builder |
Returns | |
---|---|
Type | Description |
Mutation.Builder |