Class ResultSet (6.68.0)

public final class ResultSet extends GeneratedMessageV3 implements ResultSetOrBuilder

Results from Read or ExecuteSql.

Protobuf type google.spanner.v1.ResultSet

Implements

ResultSetOrBuilder

Static Fields

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
Type Description
int

ROWS_FIELD_NUMBER

public static final int ROWS_FIELD_NUMBER
Field Value
Type Description
int

STATS_FIELD_NUMBER

public static final int STATS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ResultSet getDefaultInstance()
Returns
Type Description
ResultSet

getDescriptor()

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

newBuilder()

public static ResultSet.Builder newBuilder()
Returns
Type Description
ResultSet.Builder

newBuilder(ResultSet prototype)

public static ResultSet.Builder newBuilder(ResultSet prototype)
Parameter
Name Description
prototype ResultSet
Returns
Type Description
ResultSet.Builder

parseDelimitedFrom(InputStream input)

public static ResultSet parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ResultSet
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ResultSet parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ResultSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ResultSet parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ResultSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ResultSet parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ResultSet
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ResultSet parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ResultSet
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ResultSet parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ResultSet
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ResultSet
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ResultSet> parser()
Returns
Type Description
Parser<ResultSet>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public ResultSet getDefaultInstanceForType()
Returns
Type Description
ResultSet

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.

getMetadataOrBuilder()

public ResultSetMetadataOrBuilder getMetadataOrBuilder()

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

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

Returns
Type Description
ResultSetMetadataOrBuilder

getParserForType()

public Parser<ResultSet> getParserForType()
Returns
Type Description
Parser<ResultSet>
Overrides

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

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>

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ResultSet.Builder newBuilderForType()
Returns
Type Description
ResultSet.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ResultSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ResultSet.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ResultSet.Builder toBuilder()
Returns
Type Description
ResultSet.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException