Class: InfluxDB2::FluxTable
- Inherits:
-
Object
- Object
- InfluxDB2::FluxTable
- Defined in:
- lib/influxdb2/client/flux_table.rb
Overview
This class represents the table structure of the Flux CSV Response. Ref: bit.ly/flux-spec#table
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#records ⇒ Object
readonly
Returns the value of attribute records.
Instance Method Summary collapse
-
#group_key ⇒ Object
A table’s group key is subset of the entire columns dataset that assigned to the table.
-
#initialize ⇒ FluxTable
constructor
A new instance of FluxTable.
Constructor Details
#initialize ⇒ FluxTable
Returns a new instance of FluxTable.
25 26 27 28 |
# File 'lib/influxdb2/client/flux_table.rb', line 25 def initialize @columns = [] @records = [] end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
30 31 32 |
# File 'lib/influxdb2/client/flux_table.rb', line 30 def columns @columns end |
#records ⇒ Object (readonly)
Returns the value of attribute records.
30 31 32 |
# File 'lib/influxdb2/client/flux_table.rb', line 30 def records @records end |
Instance Method Details
#group_key ⇒ Object
A table’s group key is subset of the entire columns dataset that assigned to the table. As such, all records within a table will have the same values for each column that is part of the group key.
34 35 36 37 38 39 40 41 42 |
# File 'lib/influxdb2/client/flux_table.rb', line 34 def group_key columns = [] @columns.each do |column| columns.push(column) if column.group end columns end |