Class: Google::Apis::SpannerV1::ResultSet

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb

Overview

Results from Read or ExecuteSql.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResultSet

Returns a new instance of ResultSet.



5709
5710
5711
# File 'lib/google/apis/spanner_v1/classes.rb', line 5709

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#metadataGoogle::Apis::SpannerV1::ResultSetMetadata

Metadata about a ResultSet or PartialResultSet. Corresponds to the JSON property metadata



5687
5688
5689
# File 'lib/google/apis/spanner_v1/classes.rb', line 5687

def 
  @metadata
end

#precommit_tokenGoogle::Apis::SpannerV1::MultiplexedSessionPrecommitToken

When a read-write transaction is executed on a multiplexed session, this precommit token is sent back to the client as a part of the [Transaction] message in the BeginTransaction response and also as a part of the [ResultSet] and [PartialResultSet] responses. Corresponds to the JSON property precommitToken



5695
5696
5697
# File 'lib/google/apis/spanner_v1/classes.rb', line 5695

def precommit_token
  @precommit_token
end

#rowsArray<Array<Object>>

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. Corresponds to the JSON property rows

Returns:

  • (Array<Array<Object>>)


5702
5703
5704
# File 'lib/google/apis/spanner_v1/classes.rb', line 5702

def rows
  @rows
end

#statsGoogle::Apis::SpannerV1::ResultSetStats

Additional statistics about a ResultSet or PartialResultSet. Corresponds to the JSON property stats



5707
5708
5709
# File 'lib/google/apis/spanner_v1/classes.rb', line 5707

def stats
  @stats
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5714
5715
5716
5717
5718
5719
# File 'lib/google/apis/spanner_v1/classes.rb', line 5714

def update!(**args)
  @metadata = args[:metadata] if args.key?(:metadata)
  @precommit_token = args[:precommit_token] if args.key?(:precommit_token)
  @rows = args[:rows] if args.key?(:rows)
  @stats = args[:stats] if args.key?(:stats)
end