Class ResultSet

public final class ResultSet extends GeneratedMessageV3 implements ResultSetOrBuilder

Results from Read or ExecuteSql.

Protobuf type google.spanner.v1.ResultSet

Implements

ResultSetOrBuilder

Fields

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

ROWS_FIELD_NUMBER

public static final int ROWS_FIELD_NUMBER
Field Value
TypeDescription
int

STATS_FIELD_NUMBER

public static final int STATS_FIELD_NUMBER
Field Value
TypeDescription
int

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstance()

public static ResultSet getDefaultInstance()
Returns
TypeDescription
ResultSet

getDefaultInstanceForType()

public ResultSet getDefaultInstanceForType()
Returns
TypeDescription
ResultSet

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

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.

getMetadataOrBuilder()

public ResultSetMetadataOrBuilder getMetadataOrBuilder()

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

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

Returns
TypeDescription
ResultSetMetadataOrBuilder

getParserForType()

public Parser<ResultSet> getParserForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
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>

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ResultSetStatsOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilder()

public static ResultSet.Builder newBuilder()
Returns
TypeDescription
ResultSet.Builder

newBuilder(ResultSet prototype)

public static ResultSet.Builder newBuilder(ResultSet prototype)
Parameter
NameDescription
prototypeResultSet
Returns
TypeDescription
ResultSet.Builder

newBuilderForType()

public ResultSet.Builder newBuilderForType()
Returns
TypeDescription
ResultSet.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ResultSet.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ResultSet.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

parseDelimitedFrom(InputStream input)

public static ResultSet parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ResultSet parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ResultSet parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ResultSet parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ResultSet parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ResultSet parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ResultSet parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ResultSet
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ResultSet> parser()
Returns
TypeDescription
Parser<ResultSet>

toBuilder()

public ResultSet.Builder toBuilder()
Returns
TypeDescription
ResultSet.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException