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

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

Overview

Results from Read or ExecuteSql.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ResultSet

Returns a new instance of ResultSet.



2579
2580
2581
# File 'generated/google/apis/spanner_v1/classes.rb', line 2579

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



2562
2563
2564
# File 'generated/google/apis/spanner_v1/classes.rb', line 2562

def 
  @metadata
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>>)


2572
2573
2574
# File 'generated/google/apis/spanner_v1/classes.rb', line 2572

def rows
  @rows
end

#statsGoogle::Apis::SpannerV1::ResultSetStats

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



2577
2578
2579
# File 'generated/google/apis/spanner_v1/classes.rb', line 2577

def stats
  @stats
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2584
2585
2586
2587
2588
# File 'generated/google/apis/spanner_v1/classes.rb', line 2584

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