Module: InfluxDB::Query::Series

Included in:
Client
Defined in:
lib/influxdb/query/series.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#delete_series(name) ⇒ Object



4
5
6
# File 'lib/influxdb/query/series.rb', line 4

def delete_series(name)
  execute("DROP SERIES FROM #{name}", db: config.database)
end

#list_seriesObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/influxdb/query/series.rb', line 8

def list_series
  resp = execute("SHOW SERIES".freeze, parse: true, db: config.database)
  resp = fetch_series(resp)
  return [] if resp.empty?

  raw_values(resp[0])
    .fetch('values'.freeze, [])
    .map { |val| val[0].split(',')[0] }
    .uniq
end