Influx-ql

Influxdb-nodejs An Influxdb Node.js Client depends on Influx-ql.
Get influx ql
const QL = require('influx-ql');
const ql = new QL('mydb');
ql.measurement = 'http';
ql.RP = 'default';
ql.addField('status', 'spdy', 'fetch time');
ql.start = '2016-01-01';
ql.end = '-3h';
ql.limit = 10;
ql.slimit = 5;
ql.order = 'desc';
ql.offset = 10;
ql.soffset = 5;
ql.tz = 'America/Chicago';
ql.where('code', 400);
ql.where('"use" <= 30');
ql.toSelect();
The enhance where function
const QL = require('influx-ql');
const ql = new QL('mydb');
ql.measurement = 'http';
ql.where("spdy", "1");
ql.emptyConditions();
ql.where("spdy", ["1", "2"]);
ql.emptyConditions();
ql.where("use", 300, ">=");
ql.emptyConditions();
ql.where({spdy: "1", method: "GET"});
ql.emptyConditions();
ql.where({spdy: "1", method: "GET"}, '!=');
ql.emptyConditions();
ql.where({spdy: "1", method: "GET"}, "or");
ql.emptyConditions();
ql.where("spdy = '1' and method = 'GET'");
ql.emptyConditions();
ql.where({spdy: /1|2/});
ql.emptyConditions();
ql.where('spdy', '1');
ql.where('method', 'GET');
ql.relation = 'or';
ql.clean();
ql.measurement = 'http';
ql.addFunction('max', 'fetch time');
ql.addGroup('spdy');
ql.subQuery();
ql.addFunction('sum', 'max');
Installation
$ npm i influx-ql
Examples
View the ./examples directory for working examples.
API
API
License
MIT