Class Mutation.Write.Builder (6.58.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
TypeDescription
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
NameDescription
valuesIterable<String>

The columns to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.protobuf.ListValue>
Returns
TypeDescription
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
NameDescription
valueString

The columns to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the columns to add.

Returns
TypeDescription
Mutation.Write.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Mutation.Write.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueListValue
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
indexint
valueListValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
Builder

build()

public Mutation.Write build()
Returns
TypeDescription
Mutation.Write

buildPartial()

public Mutation.Write buildPartial()
Returns
TypeDescription
Mutation.Write

clear()

public Mutation.Write.Builder clear()
Returns
TypeDescription
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
TypeDescription
Mutation.Write.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Mutation.Write.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Mutation.Write.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Mutation.Write.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Mutation.Write.Builder

clone()

public Mutation.Write.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the columns.

getDefaultInstanceForType()

public Mutation.Write getDefaultInstanceForType()
Returns
TypeDescription
Mutation.Write

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getTable()

public String getTable()

Required. The table whose rows will be written.

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

Returns
TypeDescription
String

The table.

getTableBytes()

public ByteString getTableBytes()

Required. The table whose rows will be written.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.protobuf.ListValueOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Mutation.Write.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Mutation.Write.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Mutation.Write.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Mutation.Write.Builder
Overrides

mergeFrom(Mutation.Write other)

public Mutation.Write.Builder mergeFrom(Mutation.Write other)
Parameter
NameDescription
otherMutation.Write
Returns
TypeDescription
Mutation.Write.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Mutation.Write.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The columns to set.

Returns
TypeDescription
Mutation.Write.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Mutation.Write.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The table to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for table to set.

Returns
TypeDescription
Mutation.Write.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Mutation.Write.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
valueListValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
Mutation.Write.Builder