Class: InfluxDB2::FluxRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/influxdb2/client/flux_table.rb

Overview

A record is a tuple of values. Each record in the table represents a single point in the series. Ref: http://bit.ly/flux-spec#record

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table, values: nil, row: nil) ⇒ FluxRecord



51
52
53
54
55
# File 'lib/influxdb2/client/flux_table.rb', line 51

def initialize(table, values: nil, row: nil)
  @table = table
  @values = values || {}
  @row = row || []
end

Instance Attribute Details

#rowObject (readonly)

Returns the value of attribute row.



57
58
59
# File 'lib/influxdb2/client/flux_table.rb', line 57

def row
  @row
end

#tableObject

Returns the value of attribute table.



57
58
59
# File 'lib/influxdb2/client/flux_table.rb', line 57

def table
  @table
end

#valuesObject (readonly)

Returns the value of attribute values.



57
58
59
# File 'lib/influxdb2/client/flux_table.rb', line 57

def values
  @values
end

Instance Method Details

#fieldString



81
82
83
# File 'lib/influxdb2/client/flux_table.rb', line 81

def field
  values['_field']
end

#measurementString



86
87
88
# File 'lib/influxdb2/client/flux_table.rb', line 86

def measurement
  values['_measurement']
end

#startTime



61
62
63
# File 'lib/influxdb2/client/flux_table.rb', line 61

def start
  values['_start']
end

#stopTime



66
67
68
# File 'lib/influxdb2/client/flux_table.rb', line 66

def stop
  values['_stop']
end

#timeTime



71
72
73
# File 'lib/influxdb2/client/flux_table.rb', line 71

def time
  values['_time']
end

#valueObject



76
77
78
# File 'lib/influxdb2/client/flux_table.rb', line 76

def value
  values['_value']
end