Class KeySet.Builder (6.89.0)

publicstaticfinalclassKeySet.BuilderextendsGeneratedMessageV3.Builder<KeySet.Builder>implementsKeySetOrBuilder

KeySet defines a collection of Cloud Spanner keys and/or key ranges. All the keys are expected to be in the same table or index. The keys need not be sorted in any particular way.

If the same key is specified multiple times in the set (for example if two ranges, two keys, or a key and a range overlap), Cloud Spanner behaves as if the key were only specified once.

Protobuf type google.spanner.v1.KeySet

Implements

KeySetOrBuilder

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllKeys(Iterable<? extends ListValue> values)

publicKeySet.BuilderaddAllKeys(Iterable<?extendsListValue>values)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.ListValue>
Returns
TypeDescription
KeySet.Builder

addAllRanges(Iterable<? extends KeyRange> values)

publicKeySet.BuilderaddAllRanges(Iterable<?extendsKeyRange>values)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.spanner.v1.KeyRange>
Returns
TypeDescription
KeySet.Builder

addKeys(ListValue value)

publicKeySet.BuilderaddKeys(ListValuevalue)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
valueListValue
Returns
TypeDescription
KeySet.Builder

addKeys(ListValue.Builder builderForValue)

publicKeySet.BuilderaddKeys(ListValue.BuilderbuilderForValue)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
KeySet.Builder

addKeys(int index, ListValue value)

publicKeySet.BuilderaddKeys(intindex,ListValuevalue)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameters
NameDescription
indexint
valueListValue
Returns
TypeDescription
KeySet.Builder

addKeys(int index, ListValue.Builder builderForValue)

publicKeySet.BuilderaddKeys(intindex,ListValue.BuilderbuilderForValue)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
KeySet.Builder

addKeysBuilder()

publicListValue.BuilderaddKeysBuilder()

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Returns
TypeDescription
Builder

addKeysBuilder(int index)

publicListValue.BuilderaddKeysBuilder(intindex)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

addRanges(KeyRange value)

publicKeySet.BuilderaddRanges(KeyRangevalue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
valueKeyRange
Returns
TypeDescription
KeySet.Builder

addRanges(KeyRange.Builder builderForValue)

publicKeySet.BuilderaddRanges(KeyRange.BuilderbuilderForValue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
builderForValueKeyRange.Builder
Returns
TypeDescription
KeySet.Builder

addRanges(int index, KeyRange value)

publicKeySet.BuilderaddRanges(intindex,KeyRangevalue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
NameDescription
indexint
valueKeyRange
Returns
TypeDescription
KeySet.Builder

addRanges(int index, KeyRange.Builder builderForValue)

publicKeySet.BuilderaddRanges(intindex,KeyRange.BuilderbuilderForValue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
NameDescription
indexint
builderForValueKeyRange.Builder
Returns
TypeDescription
KeySet.Builder

addRangesBuilder()

publicKeyRange.BuilderaddRangesBuilder()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
TypeDescription
KeyRange.Builder

addRangesBuilder(int index)

publicKeyRange.BuilderaddRangesBuilder(intindex)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeyRange.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicKeySet.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeySet.Builder
Overrides

build()

publicKeySetbuild()
Returns
TypeDescription
KeySet

buildPartial()

publicKeySetbuildPartial()
Returns
TypeDescription
KeySet

clear()

publicKeySet.Builderclear()
Returns
TypeDescription
KeySet.Builder
Overrides

clearAll()

publicKeySet.BuilderclearAll()

For convenience all can be set to true to indicate that this KeySet matches all keys in the table or index. Note that any keys specified in keys or ranges are only yielded once.

bool all = 3;

Returns
TypeDescription
KeySet.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicKeySet.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
KeySet.Builder
Overrides

clearKeys()

publicKeySet.BuilderclearKeys()

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Returns
TypeDescription
KeySet.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicKeySet.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
KeySet.Builder
Overrides

clearRanges()

publicKeySet.BuilderclearRanges()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
TypeDescription
KeySet.Builder

clone()

publicKeySet.Builderclone()
Returns
TypeDescription
KeySet.Builder
Overrides

getAll()

publicbooleangetAll()

For convenience all can be set to true to indicate that this KeySet matches all keys in the table or index. Note that any keys specified in keys or ranges are only yielded once.

bool all = 3;

Returns
TypeDescription
boolean

The all.

getDefaultInstanceForType()

publicKeySetgetDefaultInstanceForType()
Returns
TypeDescription
KeySet

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKeys(int index)

publicListValuegetKeys(intindex)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ListValue

getKeysBuilder(int index)

publicListValue.BuildergetKeysBuilder(intindex)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

getKeysBuilderList()

publicList<ListValue.Builder>getKeysBuilderList()

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Returns
TypeDescription
List<Builder>

getKeysCount()

publicintgetKeysCount()

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Returns
TypeDescription
int

getKeysList()

publicList<ListValue>getKeysList()

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Returns
TypeDescription
List<ListValue>

getKeysOrBuilder(int index)

publicListValueOrBuildergetKeysOrBuilder(intindex)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ListValueOrBuilder

getKeysOrBuilderList()

publicList<?extendsListValueOrBuilder>getKeysOrBuilderList()

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Returns
TypeDescription
List<? extends com.google.protobuf.ListValueOrBuilder>

getRanges(int index)

publicKeyRangegetRanges(intindex)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeyRange

getRangesBuilder(int index)

publicKeyRange.BuildergetRangesBuilder(intindex)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeyRange.Builder

getRangesBuilderList()

publicList<KeyRange.Builder>getRangesBuilderList()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
TypeDescription
List<Builder>

getRangesCount()

publicintgetRangesCount()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
TypeDescription
int

getRangesList()

publicList<KeyRange>getRangesList()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
TypeDescription
List<KeyRange>

getRangesOrBuilder(int index)

publicKeyRangeOrBuildergetRangesOrBuilder(intindex)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeyRangeOrBuilder

getRangesOrBuilderList()

publicList<?extendsKeyRangeOrBuilder>getRangesOrBuilderList()

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Returns
TypeDescription
List<? extends com.google.spanner.v1.KeyRangeOrBuilder>

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicKeySet.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
KeySet.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

publicKeySet.BuildermergeFrom(Messageother)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
KeySet.Builder
Overrides

mergeFrom(KeySet other)

publicKeySet.BuildermergeFrom(KeySetother)
Parameter
NameDescription
otherKeySet
Returns
TypeDescription
KeySet.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalKeySet.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeySet.Builder
Overrides

removeKeys(int index)

publicKeySet.BuilderremoveKeys(intindex)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeySet.Builder

removeRanges(int index)

publicKeySet.BuilderremoveRanges(intindex)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
KeySet.Builder

setAll(boolean value)

publicKeySet.BuildersetAll(booleanvalue)

For convenience all can be set to true to indicate that this KeySet matches all keys in the table or index. Note that any keys specified in keys or ranges are only yielded once.

bool all = 3;

Parameter
NameDescription
valueboolean

The all to set.

Returns
TypeDescription
KeySet.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicKeySet.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
KeySet.Builder
Overrides

setKeys(int index, ListValue value)

publicKeySet.BuildersetKeys(intindex,ListValuevalue)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameters
NameDescription
indexint
valueListValue
Returns
TypeDescription
KeySet.Builder

setKeys(int index, ListValue.Builder builderForValue)

publicKeySet.BuildersetKeys(intindex,ListValue.BuilderbuilderForValue)

A list of specific keys. Entries in keys should have exactly as many elements as there are columns in the primary or index key with which this KeySet is used. Individual key values are encoded as described here.

repeated .google.protobuf.ListValue keys = 1;

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
KeySet.Builder

setRanges(int index, KeyRange value)

publicKeySet.BuildersetRanges(intindex,KeyRangevalue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
NameDescription
indexint
valueKeyRange
Returns
TypeDescription
KeySet.Builder

setRanges(int index, KeyRange.Builder builderForValue)

publicKeySet.BuildersetRanges(intindex,KeyRange.BuilderbuilderForValue)

A list of key ranges. See KeyRange for more information about key range specifications.

repeated .google.spanner.v1.KeyRange ranges = 2;

Parameters
NameDescription
indexint
builderForValueKeyRange.Builder
Returns
TypeDescription
KeySet.Builder

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

publicKeySet.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
KeySet.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalKeySet.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
KeySet.Builder
Overrides