Class: Latias::Influxdb::Bucket

Inherits:
ActionBucket::Base show all
Defined in:
lib/latias/influxdb/bucket.rb

Overview

Bucket

Instance Attribute Summary

Attributes inherited from ActionBucket::Base

#bucket, #client, #org, #precision, #query, #token, #url, #use_ssl, #verify_mode

Instance Method Summary collapse

Methods inherited from ActionBucket::Base

#call, #client_connection, #execute

Instance Method Details

#client_reconnectionObject



39
40
41
# File 'lib/latias/influxdb/bucket.rb', line 39

def client_reconnection
  client_connection
end

#duplicate(query) ⇒ Object



22
23
24
# File 'lib/latias/influxdb/bucket.rb', line 22

def duplicate(query)
  merge_query('duplicate', query)
end

#filter(query) ⇒ Object



18
19
20
# File 'lib/latias/influxdb/bucket.rb', line 18

def filter(query)
  merge_query('filter', query)
end

#merge_query(key, query) ⇒ Object



26
27
28
# File 'lib/latias/influxdb/bucket.rb', line 26

def merge_query(key, query)
  raw_function "#{key}(#{query})"
end

#range(query) ⇒ Object



14
15
16
# File 'lib/latias/influxdb/bucket.rb', line 14

def range(query)
  merge_query('range', query)
end

#raw_function(function) ⇒ Object



30
31
32
# File 'lib/latias/influxdb/bucket.rb', line 30

def raw_function(function)
  raw_query "#{new_command} #{function}"
end

#raw_query(query) ⇒ Object



34
35
36
37
# File 'lib/latias/influxdb/bucket.rb', line 34

def raw_query(query)
  @query += query
  self
end

#yield(query) ⇒ Object



10
11
12
# File 'lib/latias/influxdb/bucket.rb', line 10

def yield(query)
  merge_query('yield', query)
end