Class Mutation.Write.Builder (6.74.0)

public static final class Mutation.Write.Builder extends GeneratedMessageV3.Builder<Mutation.Write.Builder> implements Mutation.WriteOrBuilder

Arguments to insert, update, insert_or_update, and replace operations.

Protobuf type google.spanner.v1.Mutation.Write

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllColumns(Iterable<String> values)

public Mutation.Write.Builder addAllColumns(Iterable<String> values)

The names of the columns in table to be written.

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.

repeated string columns = 2;

Parameter
Name Description
values Iterable<String>

The columns to add.

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

addAllValues(Iterable<? extends ListValue> values)

public Mutation.Write.Builder addAllValues(Iterable<? extends ListValue> values)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.ListValue>
Returns
Type Description
Mutation.Write.Builder

addColumns(String value)

public Mutation.Write.Builder addColumns(String value)

The names of the columns in table to be written.

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.

repeated string columns = 2;

Parameter
Name Description
value String

The columns to add.

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

addColumnsBytes(ByteString value)

public Mutation.Write.Builder addColumnsBytes(ByteString value)

The names of the columns in table to be written.

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.

repeated string columns = 2;

Parameter
Name Description
value ByteString

The bytes of the columns to add.

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Mutation.Write.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Mutation.Write.Builder
Overrides

addValues(ListValue value)

public Mutation.Write.Builder addValues(ListValue value)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
value ListValue
Returns
Type Description
Mutation.Write.Builder

addValues(ListValue.Builder builderForValue)

public Mutation.Write.Builder addValues(ListValue.Builder builderForValue)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Mutation.Write.Builder

addValues(int index, ListValue value)

public Mutation.Write.Builder addValues(int index, ListValue value)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameters
Name Description
index int
value ListValue
Returns
Type Description
Mutation.Write.Builder

addValues(int index, ListValue.Builder builderForValue)

public Mutation.Write.Builder addValues(int index, ListValue.Builder builderForValue)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
Mutation.Write.Builder

addValuesBuilder()

public ListValue.Builder addValuesBuilder()

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Returns
Type Description
Builder

addValuesBuilder(int index)

public ListValue.Builder addValuesBuilder(int index)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
index int
Returns
Type Description
Builder

build()

public Mutation.Write build()
Returns
Type Description
Mutation.Write

buildPartial()

public Mutation.Write buildPartial()
Returns
Type Description
Mutation.Write

clear()

public Mutation.Write.Builder clear()
Returns
Type Description
Mutation.Write.Builder
Overrides

clearColumns()

public Mutation.Write.Builder clearColumns()

The names of the columns in table to be written.

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.

repeated string columns = 2;

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Mutation.Write.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Mutation.Write.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Mutation.Write.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Mutation.Write.Builder
Overrides

clearTable()

public Mutation.Write.Builder clearTable()

Required. The table whose rows will be written.

string table = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

clearValues()

public Mutation.Write.Builder clearValues()

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Returns
Type Description
Mutation.Write.Builder

clone()

public Mutation.Write.Builder clone()
Returns
Type Description
Mutation.Write.Builder
Overrides

getColumns(int index)

public String getColumns(int index)

The names of the columns in table to be written.

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.

repeated string columns = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The columns at the given index.

getColumnsBytes(int index)

public ByteString getColumnsBytes(int index)

The names of the columns in table to be written.

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.

repeated string columns = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the columns at the given index.

getColumnsCount()

public int getColumnsCount()

The names of the columns in table to be written.

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.

repeated string columns = 2;

Returns
Type Description
int

The count of columns.

getColumnsList()

public ProtocolStringList getColumnsList()

The names of the columns in table to be written.

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.

repeated string columns = 2;

Returns
Type Description
ProtocolStringList

A list containing the columns.

getDefaultInstanceForType()

public Mutation.Write getDefaultInstanceForType()
Returns
Type Description
Mutation.Write

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getTable()

public String getTable()

Required. The table whose rows will be written.

string table = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The table.

getTableBytes()

public ByteString getTableBytes()

Required. The table whose rows will be written.

string table = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for table.

getValues(int index)

public ListValue getValues(int index)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
index int
Returns
Type Description
ListValue

getValuesBuilder(int index)

public ListValue.Builder getValuesBuilder(int index)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
index int
Returns
Type Description
Builder

getValuesBuilderList()

public List<ListValue.Builder> getValuesBuilderList()

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Returns
Type Description
List<Builder>

getValuesCount()

public int getValuesCount()

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Returns
Type Description
int

getValuesList()

public List<ListValue> getValuesList()

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Returns
Type Description
List<ListValue>

getValuesOrBuilder(int index)

public ListValueOrBuilder getValuesOrBuilder(int index)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
index int
Returns
Type Description
ListValueOrBuilder

getValuesOrBuilderList()

public List<? extends ListValueOrBuilder> getValuesOrBuilderList()

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Returns
Type Description
List<? extends com.google.protobuf.ListValueOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Mutation.Write.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Mutation.Write.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Mutation.Write.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Mutation.Write.Builder
Overrides

mergeFrom(Mutation.Write other)

public Mutation.Write.Builder mergeFrom(Mutation.Write other)
Parameter
Name Description
other Mutation.Write
Returns
Type Description
Mutation.Write.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Mutation.Write.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Mutation.Write.Builder
Overrides

removeValues(int index)

public Mutation.Write.Builder removeValues(int index)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameter
Name Description
index int
Returns
Type Description
Mutation.Write.Builder

setColumns(int index, String value)

public Mutation.Write.Builder setColumns(int index, String value)

The names of the columns in table to be written.

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.

repeated string columns = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The columns to set.

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Mutation.Write.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Mutation.Write.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Mutation.Write.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Mutation.Write.Builder
Overrides

setTable(String value)

public Mutation.Write.Builder setTable(String value)

Required. The table whose rows will be written.

string table = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The table to set.

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

setTableBytes(ByteString value)

public Mutation.Write.Builder setTableBytes(ByteString value)

Required. The table whose rows will be written.

string table = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for table to set.

Returns
Type Description
Mutation.Write.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Mutation.Write.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Mutation.Write.Builder
Overrides

setValues(int index, ListValue value)

public Mutation.Write.Builder setValues(int index, ListValue value)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameters
Name Description
index int
value ListValue
Returns
Type Description
Mutation.Write.Builder

setValues(int index, ListValue.Builder builderForValue)

public Mutation.Write.Builder setValues(int index, ListValue.Builder builderForValue)

The values to be written. values can contain more than one list of values. If it does, then multiple rows are written, one for each entry in values. Each list in values must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple Mutations, each containing one values entry and repeating table and columns. Individual values in each list are encoded as described here.

repeated .google.protobuf.ListValue values = 3;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
Mutation.Write.Builder