Class ResultSet

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ResultSetOrBuilder, Serializable

    public final class ResultSet
    extends com.google.protobuf.GeneratedMessageV3
    implements ResultSetOrBuilder
     Results from [Read][google.spanner.v1.Spanner.Read] or
     [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
     
    Protobuf type google.spanner.v1.ResultSet
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ResultSet.Builder
      Results from [Read][google.spanner.v1.Spanner.Read] or [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql].
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int METADATA_FIELD_NUMBER  
      static int ROWS_FIELD_NUMBER  
      static int STATS_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessageV3

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(Object obj)  
      static ResultSet getDefaultInstance()  
      ResultSet getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      ResultSetMetadata getMetadata()
      Metadata about the result set, such as row type information.
      ResultSetMetadataOrBuilder getMetadataOrBuilder()
      Metadata about the result set, such as row type information.
      com.google.protobuf.Parser<ResultSet> getParserForType()  
      com.google.protobuf.ListValue getRows​(int index)
      Each element in `rows` is a row whose format is defined by [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type].
      int getRowsCount()
      Each element in `rows` is a row whose format is defined by [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type].
      List<com.google.protobuf.ListValue> getRowsList()
      Each element in `rows` is a row whose format is defined by [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type].
      com.google.protobuf.ListValueOrBuilder getRowsOrBuilder​(int index)
      Each element in `rows` is a row whose format is defined by [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type].
      List<? extends com.google.protobuf.ListValueOrBuilder> getRowsOrBuilderList()
      Each element in `rows` is a row whose format is defined by [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type].
      int getSerializedSize()  
      ResultSetStats getStats()
      Query plan and execution statistics for the SQL statement that produced this result set.
      ResultSetStatsOrBuilder getStatsOrBuilder()
      Query plan and execution statistics for the SQL statement that produced this result set.
      int hashCode()  
      boolean hasMetadata()
      Metadata about the result set, such as row type information.
      boolean hasStats()
      Query plan and execution statistics for the SQL statement that produced this result set.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      static ResultSet.Builder newBuilder()  
      static ResultSet.Builder newBuilder​(ResultSet prototype)  
      ResultSet.Builder newBuilderForType()  
      protected ResultSet.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)  
      protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)  
      static ResultSet parseDelimitedFrom​(InputStream input)  
      static ResultSet parseDelimitedFrom​(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static ResultSet parseFrom​(byte[] data)  
      static ResultSet parseFrom​(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static ResultSet parseFrom​(com.google.protobuf.ByteString data)  
      static ResultSet parseFrom​(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static ResultSet parseFrom​(com.google.protobuf.CodedInputStream input)  
      static ResultSet parseFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static ResultSet parseFrom​(InputStream input)  
      static ResultSet parseFrom​(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static ResultSet parseFrom​(ByteBuffer data)  
      static ResultSet parseFrom​(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      static com.google.protobuf.Parser<ResultSet> parser()  
      ResultSet.Builder toBuilder()  
      void writeTo​(com.google.protobuf.CodedOutputStream output)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3

        canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
      • Methods inherited from class com.google.protobuf.AbstractMessage

        findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite

        addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageLite

        toByteArray, toByteString, writeDelimitedTo, writeTo
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • hasMetadata

        public boolean hasMetadata()
         Metadata about the result set, such as row type information.
         
        .google.spanner.v1.ResultSetMetadata metadata = 1;
        Specified by:
        hasMetadata in interface ResultSetOrBuilder
        Returns:
        Whether the metadata field is set.
      • getMetadata

        public ResultSetMetadata getMetadata()
         Metadata about the result set, such as row type information.
         
        .google.spanner.v1.ResultSetMetadata metadata = 1;
        Specified by:
        getMetadata in interface ResultSetOrBuilder
        Returns:
        The metadata.
      • getRowsList

        public List<com.google.protobuf.ListValue> getRowsList()
         Each element in `rows` is a row whose format is defined by
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
         in each row matches the ith field in
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
         encoded based on type as described
         [here][google.spanner.v1.TypeCode].
         
        repeated .google.protobuf.ListValue rows = 2;
        Specified by:
        getRowsList in interface ResultSetOrBuilder
      • getRowsOrBuilderList

        public List<? extends com.google.protobuf.ListValueOrBuilder> getRowsOrBuilderList()
         Each element in `rows` is a row whose format is defined by
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
         in each row matches the ith field in
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
         encoded based on type as described
         [here][google.spanner.v1.TypeCode].
         
        repeated .google.protobuf.ListValue rows = 2;
        Specified by:
        getRowsOrBuilderList in interface ResultSetOrBuilder
      • getRowsCount

        public int getRowsCount()
         Each element in `rows` is a row whose format is defined by
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
         in each row matches the ith field in
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
         encoded based on type as described
         [here][google.spanner.v1.TypeCode].
         
        repeated .google.protobuf.ListValue rows = 2;
        Specified by:
        getRowsCount in interface ResultSetOrBuilder
      • getRows

        public com.google.protobuf.ListValue getRows​(int index)
         Each element in `rows` is a row whose format is defined by
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
         in each row matches the ith field in
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
         encoded based on type as described
         [here][google.spanner.v1.TypeCode].
         
        repeated .google.protobuf.ListValue rows = 2;
        Specified by:
        getRows in interface ResultSetOrBuilder
      • getRowsOrBuilder

        public com.google.protobuf.ListValueOrBuilder getRowsOrBuilder​(int index)
         Each element in `rows` is a row whose format is defined by
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. The ith element
         in each row matches the ith field in
         [metadata.row_type][google.spanner.v1.ResultSetMetadata.row_type]. Elements are
         encoded based on type as described
         [here][google.spanner.v1.TypeCode].
         
        repeated .google.protobuf.ListValue rows = 2;
        Specified by:
        getRowsOrBuilder in interface ResultSetOrBuilder
      • 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][google.spanner.v1.ExecuteSqlRequest.query_mode].
         DML statements always produce stats containing the number of rows
         modified, unless executed using the
         [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN] [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
         Other fields may or may not be populated, based on the
         [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
         
        .google.spanner.v1.ResultSetStats stats = 3;
        Specified by:
        hasStats in interface ResultSetOrBuilder
        Returns:
        Whether the stats field is set.
      • 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][google.spanner.v1.ExecuteSqlRequest.query_mode].
         DML statements always produce stats containing the number of rows
         modified, unless executed using the
         [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN] [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
         Other fields may or may not be populated, based on the
         [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
         
        .google.spanner.v1.ResultSetStats stats = 3;
        Specified by:
        getStats in interface ResultSetOrBuilder
        Returns:
        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][google.spanner.v1.ExecuteSqlRequest.query_mode].
         DML statements always produce stats containing the number of rows
         modified, unless executed using the
         [ExecuteSqlRequest.QueryMode.PLAN][google.spanner.v1.ExecuteSqlRequest.QueryMode.PLAN] [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
         Other fields may or may not be populated, based on the
         [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode].
         
        .google.spanner.v1.ResultSetStats stats = 3;
        Specified by:
        getStatsOrBuilder in interface ResultSetOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static ResultSet parseFrom​(ByteBuffer data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ResultSet parseFrom​(ByteBuffer data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ResultSet parseFrom​(com.google.protobuf.ByteString data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ResultSet parseFrom​(com.google.protobuf.ByteString data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ResultSet parseFrom​(byte[] data)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ResultSet parseFrom​(byte[] data,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static ResultSet parseFrom​(com.google.protobuf.CodedInputStream input,
                                          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                   throws IOException
        Throws:
        IOException
      • newBuilderForType

        public ResultSet.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public ResultSet.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected ResultSet.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static ResultSet getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<ResultSet> parser()
      • getParserForType

        public com.google.protobuf.Parser<ResultSet> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public ResultSet getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder