Class ResultSet.Builder (6.50.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.protobuf.ListValue>
Returns
TypeDescription
ResultSet.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ResultSet build()
Returns
TypeDescription
ResultSet

buildPartial()

public ResultSet buildPartial()
Returns
TypeDescription
ResultSet

clear()

public ResultSet.Builder clear()
Returns
TypeDescription
ResultSet.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ResultSet.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ResultSet.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public ResultSet.Builder clone()
Returns
TypeDescription
ResultSet.Builder
Overrides

getDefaultInstanceForType()

public ResultSet getDefaultInstanceForType()
Returns
TypeDescription
ResultSet

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMetadata()

public ResultSetMetadata getMetadata()

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

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

Returns
TypeDescription
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
TypeDescription
ResultSetMetadata.Builder

getMetadataOrBuilder()

public ResultSetMetadataOrBuilder getMetadataOrBuilder()

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

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

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

hasMetadata()

public boolean hasMetadata()

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

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

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

Whether the stats field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(ResultSet other)

public ResultSet.Builder mergeFrom(ResultSet other)
Parameter
NameDescription
otherResultSet
Returns
TypeDescription
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
NameDescription
valueResultSetMetadata
Returns
TypeDescription
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
NameDescription
valueResultSetStats
Returns
TypeDescription
ResultSet.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public ResultSet.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueResultSetMetadata
Returns
TypeDescription
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
NameDescription
builderForValueResultSetMetadata.Builder
Returns
TypeDescription
ResultSet.Builder

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

public ResultSet.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueListValue
Returns
TypeDescription
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
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
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
NameDescription
valueResultSetStats
Returns
TypeDescription
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
NameDescription
builderForValueResultSetStats.Builder
Returns
TypeDescription
ResultSet.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final ResultSet.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ResultSet.Builder
Overrides