Class ResultSet.Builder (6.74.0)

public static final class ResultSet.Builder extends GeneratedMessageV3.Builder<ResultSet.Builder> implements ResultSetOrBuilder

Results from Read or ExecuteSql.

Protobuf type google.spanner.v1.ResultSet

Implements

ResultSetOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllRows(Iterable<? extends ListValue> values)

public ResultSet.Builder addAllRows(Iterable<? extends ListValue> values)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

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

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRows(ListValue value)

public ResultSet.Builder addRows(ListValue value)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
value ListValue
Returns
Type Description
ResultSet.Builder

addRows(ListValue.Builder builderForValue)

public ResultSet.Builder addRows(ListValue.Builder builderForValue)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ResultSet.Builder

addRows(int index, ListValue value)

public ResultSet.Builder addRows(int index, ListValue value)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameters
Name Description
index int
value ListValue
Returns
Type Description
ResultSet.Builder

addRows(int index, ListValue.Builder builderForValue)

public ResultSet.Builder addRows(int index, ListValue.Builder builderForValue)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
ResultSet.Builder

addRowsBuilder()

public ListValue.Builder addRowsBuilder()

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Returns
Type Description
Builder

addRowsBuilder(int index)

public ListValue.Builder addRowsBuilder(int index)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
index int
Returns
Type Description
Builder

build()

public ResultSet build()
Returns
Type Description
ResultSet

buildPartial()

public ResultSet buildPartial()
Returns
Type Description
ResultSet

clear()

public ResultSet.Builder clear()
Returns
Type Description
ResultSet.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearMetadata()

public ResultSet.Builder clearMetadata()

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Returns
Type Description
ResultSet.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRows()

public ResultSet.Builder clearRows()

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Returns
Type Description
ResultSet.Builder

clearStats()

public ResultSet.Builder clearStats()

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Returns
Type Description
ResultSet.Builder

clone()

public ResultSet.Builder clone()
Returns
Type Description
ResultSet.Builder
Overrides

getDefaultInstanceForType()

public ResultSet getDefaultInstanceForType()
Returns
Type Description
ResultSet

getDescriptorForType()

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

getMetadata()

public ResultSetMetadata getMetadata()

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Returns
Type Description
ResultSetMetadata

The metadata.

getMetadataBuilder()

public ResultSetMetadata.Builder getMetadataBuilder()

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Returns
Type Description
ResultSetMetadata.Builder

getMetadataOrBuilder()

public ResultSetMetadataOrBuilder getMetadataOrBuilder()

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Returns
Type Description
ResultSetMetadataOrBuilder

getRows(int index)

public ListValue getRows(int index)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
index int
Returns
Type Description
ListValue

getRowsBuilder(int index)

public ListValue.Builder getRowsBuilder(int index)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
index int
Returns
Type Description
Builder

getRowsBuilderList()

public List<ListValue.Builder> getRowsBuilderList()

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Returns
Type Description
List<Builder>

getRowsCount()

public int getRowsCount()

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Returns
Type Description
int

getRowsList()

public List<ListValue> getRowsList()

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Returns
Type Description
List<ListValue>

getRowsOrBuilder(int index)

public ListValueOrBuilder getRowsOrBuilder(int index)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
index int
Returns
Type Description
ListValueOrBuilder

getRowsOrBuilderList()

public List<? extends ListValueOrBuilder> getRowsOrBuilderList()

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

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

getStats()

public ResultSetStats getStats()

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Returns
Type Description
ResultSetStats

The stats.

getStatsBuilder()

public ResultSetStats.Builder getStatsBuilder()

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Returns
Type Description
ResultSetStats.Builder

getStatsOrBuilder()

public ResultSetStatsOrBuilder getStatsOrBuilder()

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Returns
Type Description
ResultSetStatsOrBuilder

hasMetadata()

public boolean hasMetadata()

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Returns
Type Description
boolean

Whether the metadata field is set.

hasStats()

public boolean hasStats()

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Returns
Type Description
boolean

Whether the stats field is set.

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 ResultSet.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(ResultSet other)

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

mergeMetadata(ResultSetMetadata value)

public ResultSet.Builder mergeMetadata(ResultSetMetadata value)

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Parameter
Name Description
value ResultSetMetadata
Returns
Type Description
ResultSet.Builder

mergeStats(ResultSetStats value)

public ResultSet.Builder mergeStats(ResultSetStats value)

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Parameter
Name Description
value ResultSetStats
Returns
Type Description
ResultSet.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeRows(int index)

public ResultSet.Builder removeRows(int index)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameter
Name Description
index int
Returns
Type Description
ResultSet.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setMetadata(ResultSetMetadata value)

public ResultSet.Builder setMetadata(ResultSetMetadata value)

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Parameter
Name Description
value ResultSetMetadata
Returns
Type Description
ResultSet.Builder

setMetadata(ResultSetMetadata.Builder builderForValue)

public ResultSet.Builder setMetadata(ResultSetMetadata.Builder builderForValue)

Metadata about the result set, such as row type information.

.google.spanner.v1.ResultSetMetadata metadata = 1;

Parameter
Name Description
builderForValue ResultSetMetadata.Builder
Returns
Type Description
ResultSet.Builder

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

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

setRows(int index, ListValue value)

public ResultSet.Builder setRows(int index, ListValue value)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameters
Name Description
index int
value ListValue
Returns
Type Description
ResultSet.Builder

setRows(int index, ListValue.Builder builderForValue)

public ResultSet.Builder setRows(int index, ListValue.Builder builderForValue)

Each element in rows is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.

repeated .google.protobuf.ListValue rows = 2;

Parameters
Name Description
index int
builderForValue Builder
Returns
Type Description
ResultSet.Builder

setStats(ResultSetStats value)

public ResultSet.Builder setStats(ResultSetStats value)

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Parameter
Name Description
value ResultSetStats
Returns
Type Description
ResultSet.Builder

setStats(ResultSetStats.Builder builderForValue)

public ResultSet.Builder setStats(ResultSetStats.Builder builderForValue)

Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode.

.google.spanner.v1.ResultSetStats stats = 3;

Parameter
Name Description
builderForValue ResultSetStats.Builder
Returns
Type Description
ResultSet.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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