From 2d638b00cf7e29bb1fd4aaf71d5193bce20fdf37 Mon Sep 17 00:00:00 2001 From: Jake Goritski Date: Tue, 3 Aug 2021 10:04:58 -0400 Subject: [PATCH 1/2] Replace 'clinet' with 'client' s/clinet/client/g --- api.md | 4 ++-- lib/client.js | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api.md b/api.md index 59ea694..c5696e9 100644 --- a/api.md +++ b/api.md @@ -5,7 +5,7 @@ [![npm](http://img.shields.io/npm/v/influxdb-nodejs.svg?style=flat-square)](https://www.npmjs.org/package/influxdb-nodejs) [![Github Releases](https://img.shields.io/npm/dm/influxdb-nodejs.svg?style=flat-square)](https://github.com/vicanso/influxdb-nodejs) -A simple clinet for influxdb, including these features: +A simple client for influxdb, including these features: - Writing multiple points @@ -25,7 +25,7 @@ Writing multiple points and set schema for measurment ```js const Influx = require('influxdb-nodejs'); -const clinet = new Influx('http://127.0.0.1:8086/mydb'); +const client = new Influx('http://127.0.0.1:8086/mydb'); const fieldSchema = { use: 'integer', bytes: 'integer', diff --git a/lib/client.js b/lib/client.js index 8eaf20e..cc8308c 100644 --- a/lib/client.js +++ b/lib/client.js @@ -242,7 +242,7 @@ class Client extends EventEmitter { * @return {String} * @since 2.2.0 * @example - * const formatType = clinet.format; + * const formatType = client.format; * console.info(formatType); * // => undefined */ @@ -311,7 +311,7 @@ class Client extends EventEmitter { * use: 1000, * }) * .queue(); - * console.info(clinet.writeQueueLength); + * console.info(client.writeQueueLength); * // => 2 */ get writeQueueLength() { @@ -329,7 +329,7 @@ class Client extends EventEmitter { * client.query('login') * .set({limit: 1}) * .queue(); - * console.info(clinet.queryQueueLength); + * console.info(client.queryQueueLength); * // => 2 */ get queryQueueLength() { @@ -733,13 +733,13 @@ class Client extends EventEmitter { * @return {Promise} * @since 2.2.0 * @example - * const clinet = new Influx('http://127.0.0.1:8086/mydb') + * const client = new Influx('http://127.0.0.1:8086/mydb') * client.queryRaw('select * from "http"') * .then(console.info) * .catch(console.error); * * @example - * const clinet = new Influx('http://127.0.0.1:8086/mydb') + * const client = new Influx('http://127.0.0.1:8086/mydb') * client.queryRaw('select * from "login"', 'testdb') * .then(console.info) * .catch(console.error); From 7fd0e50f68615d0d3fc95fa94956c2d76faa0faf Mon Sep 17 00:00:00 2001 From: Jake Goritski Date: Tue, 3 Aug 2021 10:05:27 -0400 Subject: [PATCH 2/2] Regenerate docs yarn run generate-docs --- docs/Client.html | 121 +- docs/QL.html | 233 ++-- docs/Reader.html | 258 ++-- docs/Writer.html | 46 +- docs/fonts/Montserrat/Montserrat-Bold.eot | Bin 0 -> 106135 bytes docs/fonts/Montserrat/Montserrat-Bold.ttf | Bin 0 -> 47088 bytes docs/fonts/Montserrat/Montserrat-Bold.woff | Bin 0 -> 112872 bytes docs/fonts/Montserrat/Montserrat-Bold.woff2 | Bin 0 -> 85436 bytes docs/fonts/Montserrat/Montserrat-Regular.eot | Bin 0 -> 106287 bytes docs/fonts/Montserrat/Montserrat-Regular.ttf | Bin 0 -> 46392 bytes docs/fonts/Montserrat/Montserrat-Regular.woff | Bin 0 -> 112020 bytes .../fonts/Montserrat/Montserrat-Regular.woff2 | Bin 0 -> 85240 bytes .../sourcesanspro-light-webfont.eot | Bin 0 -> 19390 bytes .../sourcesanspro-light-webfont.svg | 978 +++++++++++++++ .../sourcesanspro-light-webfont.ttf | Bin 0 -> 67760 bytes .../sourcesanspro-light-webfont.woff | Bin 0 -> 21132 bytes .../sourcesanspro-light-webfont.woff2 | Bin 0 -> 16080 bytes .../sourcesanspro-regular-webfont.eot | Bin 0 -> 20014 bytes .../sourcesanspro-regular-webfont.svg | 1049 +++++++++++++++++ .../sourcesanspro-regular-webfont.ttf | Bin 0 -> 68656 bytes .../sourcesanspro-regular-webfont.woff | Bin 0 -> 21720 bytes .../sourcesanspro-regular-webfont.woff2 | Bin 0 -> 16636 bytes docs/index.html | 36 +- docs/lib_client.js.html | 15 +- docs/lib_reader.js.html | 5 +- docs/lib_writer.js.html | 5 +- docs/node_modules_influx-ql_lib_ql.js.html | 26 +- docs/scripts/collapse.js | 21 +- docs/scripts/nav.js | 12 + docs/scripts/polyfill.js | 4 + docs/scripts/search.js | 114 +- docs/styles/jsdoc.css | 104 +- 32 files changed, 2649 insertions(+), 378 deletions(-) create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.eot create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.ttf create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.woff create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.woff2 create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.eot create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.ttf create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.woff create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.woff2 create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff create mode 100644 docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 create mode 100644 docs/scripts/nav.js create mode 100644 docs/scripts/polyfill.js diff --git a/docs/Client.html b/docs/Client.html index 537d331..1548eb2 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -13,6 +13,7 @@ + @@ -176,7 +177,7 @@

avail -
+

Get the available list

@@ -249,7 +250,7 @@

database +

Get the database

@@ -322,7 +323,7 @@

epoch +

Get the specified precision of epoch timestamps

@@ -395,7 +396,7 @@

epoch +

Set the specified precision of epoch timestamps.It should be [h,m,s,ms,u,ns]

@@ -426,7 +427,7 @@

formatSource:
@@ -468,8 +469,8 @@

format -

Set the query data format type

+
+

Get the query data format type

@@ -480,9 +481,9 @@

formatExample

-
client.format = 'json';
-console.info(client.format);
-// => 'json'
+
const formatType = client.format;
+console.info(formatType);
+// => undefined
@@ -499,7 +500,7 @@

formatSource:
@@ -541,8 +542,8 @@

format -

Get the query data format type

+
+

Set the query data format type

@@ -553,9 +554,9 @@

formatExample

-
const formatType = clinet.format;
-console.info(formatType);
-// => undefined
+
client.format = 'json';
+console.info(client.format);
+// => 'json'
@@ -614,7 +615,7 @@

query -
+

Get the query queue length

@@ -632,7 +633,7 @@
Example
client.query('login') .set({limit: 1}) .queue(); -console.info(clinet.queryQueueLength); +console.info(client.queryQueueLength); // => 2 @@ -650,7 +651,7 @@

timeoutSource:
@@ -692,8 +693,8 @@

timeout -

Set the http request timeout value.

+
+

Set the http request timeout value, the unit is ms. The default is 0, no timeout.

@@ -704,9 +705,9 @@

timeoutExample

-
client.timeout = 1000;
-console.info(client.timeout);
-// => 1000
+
const ms = client.timeout;
+console.info(ms);
+// => 0
@@ -723,7 +724,7 @@

timeoutSource:
@@ -765,8 +766,8 @@

timeout -

Set the http request timeout value, the unit is ms. The default is 0, no timeout.

+
+

Set the http request timeout value.

@@ -777,9 +778,9 @@

timeoutExample

-
const ms = client.timeout;
-console.info(ms);
-// => 0
+
client.timeout = 1000;
+console.info(client.timeout);
+// => 1000
@@ -840,7 +841,7 @@

una -
+

Get the unavailable list

@@ -913,7 +914,7 @@

write -
+

Get the write queue length

@@ -943,7 +944,7 @@
Example
use: 1000, }) .queue(); -console.info(clinet.writeQueueLength); +console.info(client.writeQueueLength); // => 2 @@ -1013,7 +1014,7 @@

addAlgori -
+

Set the load balance algorithm

@@ -1182,7 +1183,7 @@

addPlugin +

Add plugin function

@@ -1327,7 +1328,7 @@

createD -
+

Create the database of the connection uri

@@ -1443,7 +1444,7 @@

-
+

Create retention policy

@@ -1699,7 +1700,7 @@

dropDatab -
+

Drop the database of the connection uri

@@ -1815,7 +1816,7 @@

dr -
+

Drop retention policy

@@ -1976,7 +1977,7 @@

findO -
+

Update one record (latest)

@@ -2179,7 +2180,7 @@

on +

Listen on the event, not is support: 'queue', 'writeQueue', 'queryQueue'

@@ -2369,7 +2370,7 @@

query +

Get the influxdb query reader

@@ -2531,7 +2532,7 @@

queryPost +

Use post for the influxdb query, such as create user

@@ -2718,7 +2719,7 @@

queryRaw +

Use influx ql to query the data

@@ -2732,12 +2733,12 @@

queryRawExamples

-
const clinet = new Influx('http://127.0.0.1:8086/mydb')
+    
const client = new Influx('http://127.0.0.1:8086/mydb')
 client.queryRaw('select * from "http"')
   .then(console.info)
   .catch(console.error);
-
const clinet = new Influx('http://127.0.0.1:8086/mydb')
+    
const client = new Influx('http://127.0.0.1:8086/mydb')
 client.queryRaw('select * from "login"', 'testdb')
   .then(console.info)
   .catch(console.error);
@@ -2911,7 +2912,7 @@

showData -
+

List all database of the server

@@ -3027,7 +3028,7 @@

showFiel -
+

Show field keys of measurement

@@ -3211,7 +3212,7 @@

showM -
+

List the measurement of the influxdb server

@@ -3327,7 +3328,7 @@

-
+

List retention policies

@@ -3443,7 +3444,7 @@

showTagKey -
+

Show tag keys of measurement

@@ -3629,7 +3630,7 @@

start -
+

Start the influxdb server health check

@@ -3817,7 +3818,7 @@

stopHe -
+

Stop the influxdb server health check

@@ -3930,7 +3931,7 @@

syncQuery +

Sync the query queue

@@ -4115,7 +4116,7 @@

syncWrite +

Sync the write queue

@@ -4251,7 +4252,7 @@

-
+

Update retention policy

@@ -4507,7 +4508,7 @@

write +

Get the writer for the influxdb

@@ -4702,7 +4703,7 @@

writePoint< -
+

Write point to influxdb

@@ -4901,12 +4902,14 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + \ No newline at end of file diff --git a/docs/QL.html b/docs/QL.html index 6090bfa..da7e95c 100644 --- a/docs/QL.html +++ b/docs/QL.html @@ -13,6 +13,7 @@ + @@ -47,7 +48,7 @@

QL

-

Influx QL

+

Influx QL

@@ -235,7 +236,7 @@

database +

Set the database for influx ql

@@ -307,7 +308,7 @@

database +

Get the database

@@ -336,7 +337,7 @@

endSource:
@@ -378,8 +379,8 @@

end -

Get influx ql end time

+
+

Set influx ql end time

@@ -393,8 +394,8 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
 ql.end = '-1h';
-console.info(ql.end);
-// => '-1h';
+console.info(ql.toSelect()); +// => select * from "mydb".."http" where time <= now() - 1h

@@ -411,7 +412,7 @@

endSource:
@@ -453,8 +454,8 @@

end -

Set influx ql end time

+
+

Get influx ql end time

@@ -468,8 +469,8 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
 ql.end = '-1h';
-console.info(ql.toSelect());
-// => select * from "mydb".."http" where time <= now() - 1h
+console.info(ql.end); +// => '-1h';

@@ -528,7 +529,7 @@

fill +

Set the influx query result fill value for time intervals that have no data

@@ -604,7 +605,7 @@

fill +

Get the influx query result fill value for time intervals that have no data

@@ -680,7 +681,7 @@

into +

Set the measurement for select into

@@ -756,7 +757,7 @@

into +

Get the measurement for select into

@@ -827,7 +828,7 @@

intoDatab -
+

Set the database for select into

@@ -903,7 +904,7 @@

intoDatab -
+

Get the database for select into

@@ -932,7 +933,7 @@

intoRPSource:
@@ -974,8 +975,8 @@

intoRP -

Get the rp for select into

+
+

Set the rp for select into

@@ -986,7 +987,12 @@

intoRPExample

-
console.info(ql.intoRP);
+
const ql = new QL('mydb');
+ql.measurement = 'http';
+ql.rp = 'my-rp';
+ql.intoDatabase = 'mydb copy';
+ql.into = 'http copy';
+ql.intoRP = 'my-rp-copy';
@@ -1003,7 +1009,7 @@

intoRPSource:
@@ -1045,8 +1051,8 @@

intoRP -

Set the rp for select into

+
+

Get the rp for select into

@@ -1057,12 +1063,7 @@

intoRPExample

-
const ql = new QL('mydb');
-ql.mearsurement = 'http';
-ql.rp = 'my-rp';
-ql.intoDatabase = 'mydb copy';
-ql.into = 'http copy';
-ql.intoRP = 'my-rp-copy';
+
console.info(ql.intoRP);
@@ -1121,7 +1122,7 @@

limit +

Set influx ql query result point limit

@@ -1196,7 +1197,7 @@

limit +

Get influx ql query result point limit

@@ -1229,7 +1230,7 @@

measuremen
Source:
@@ -1273,8 +1274,8 @@

measuremen -
-

Get influx ql measurement

+
+

Set influx ql measurement

@@ -1287,8 +1288,8 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
-console.info(ql.measurement);
-// => 'http'
+console.info(ql.toSelect()); +// => select * from "mydb".."http" @@ -1305,7 +1306,7 @@

measuremen
Source:
@@ -1349,8 +1350,8 @@

measuremen -
-

Set influx ql measurement

+
+

Get influx ql measurement

@@ -1363,8 +1364,8 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
-console.info(ql.toSelect());
-// => select * from "mydb".."http"
+console.info(ql.measurement); +// => 'http' @@ -1381,7 +1382,7 @@

offsetSource:
@@ -1423,8 +1424,8 @@

offset -

Get influx ql query offset of the result

+
+

Set influx ql query offset of the result

@@ -1437,11 +1438,9 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
-console.info(ql.offset);
-// => 0
 ql.offset = 10;
-console.info(ql.offset);
-// => 10
+console.info(ql.toSelect()); +// => select * from "mydb".."http" offset 10
@@ -1458,7 +1457,7 @@

offsetSource:
@@ -1500,8 +1499,8 @@

offset -

Set influx ql query offset of the result

+
+

Get influx ql query offset of the result

@@ -1514,9 +1513,11 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
+console.info(ql.offset);
+// => 0
 ql.offset = 10;
-console.info(ql.toSelect());
-// => select * from "mydb".."http" offset 10
+console.info(ql.offset); +// => 10 @@ -1533,7 +1534,7 @@

orderSource:
@@ -1575,8 +1576,8 @@

order -

Get the influx query result order of time

+
+

Set the influx query result order of time

@@ -1590,10 +1591,9 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
 ql.addGroup('spdy');
-console.info(ql.order);
-// => undefined
 ql.order = 'desc';
-// => 'desc'
+console.info(ql.toSelect()); +// => select * from "mydb".."http" group by "spdy" order by time desc @@ -1610,7 +1610,7 @@

orderSource:
@@ -1652,8 +1652,8 @@

order -

Set the influx query result order of time

+
+

Get the influx query result order of time

@@ -1667,9 +1667,10 @@
Example
const ql = new QL('mydb');
 ql.measurement = 'http';
 ql.addGroup('spdy');
+console.info(ql.order);
+// => undefined
 ql.order = 'desc';
-console.info(ql.toSelect());
-// => select * from "mydb".."http" group by "spdy" order by time desc
+// => 'desc' @@ -1686,7 +1687,7 @@

relationSource:
@@ -1728,8 +1729,8 @@

relation -

Set influx ql default where relation

+
+

Get influx ql default where relation

@@ -1742,10 +1743,7 @@
Example
const ql = new QL('mydb');
 console.info(ql.relation);
-// => and
-ql.relation = 'or';
-console.info(ql.relation);
-// => or
+// => 'and' @@ -1762,7 +1760,7 @@

relationSource:
@@ -1804,8 +1802,8 @@

relation -

Get influx ql default where relation

+
+

Set influx ql default where relation

@@ -1818,7 +1816,10 @@
Example
const ql = new QL('mydb');
 console.info(ql.relation);
-// => 'and'
+// => and +ql.relation = 'or'; +console.info(ql.relation); +// => or @@ -1877,7 +1878,7 @@

RP +

Set influx ql retention policy

@@ -1952,7 +1953,7 @@

RP +

Get influx ql retention policy

@@ -1985,7 +1986,7 @@

slimitSource:
@@ -2027,8 +2028,8 @@

slimit -

Get influx query result series limit

+
+

Set influx query result series limit

@@ -2041,8 +2042,8 @@
Example
const ql = new QL('mydb');
 ql.slimit = 3;
-console.info(ql.slimit);
-// => 3
+console.info(ql.toSelect()); +// => select * from "mydb" slimit 3 @@ -2059,7 +2060,7 @@

slimitSource:
@@ -2101,8 +2102,8 @@

slimit -

Set influx query result series limit

+
+

Get influx query result series limit

@@ -2115,8 +2116,8 @@
Example
const ql = new QL('mydb');
 ql.slimit = 3;
-console.info(ql.toSelect());
-// => select * from "mydb" slimit 3
+console.info(ql.slimit); +// => 3 @@ -2175,7 +2176,7 @@

soffset +

Set influx ql offset series in the query results

@@ -2249,7 +2250,7 @@

soffset +

Get influx ql offset series in the query results

@@ -2325,7 +2326,7 @@

start +

Set influx ql start time

@@ -2412,7 +2413,7 @@

start +

Get influx ql start time

@@ -2487,7 +2488,7 @@

tz +

Set influx ql time zone

@@ -2561,7 +2562,7 @@

tz +

Get influx ql time zone

@@ -2645,7 +2646,7 @@

addField +

Add the field of the query result

@@ -2817,7 +2818,7 @@

addFunctio -
+

Add influx ql function

@@ -3082,7 +3083,7 @@

addGroup +

Add influx ql group by

@@ -3256,7 +3257,7 @@

addMeas -
+

Add influx ql measurement

@@ -3429,7 +3430,7 @@

clean +

Clean all the influx ql condition

@@ -3530,7 +3531,7 @@

emptyC -
+

Empty the influx ql where condition

@@ -3653,7 +3654,7 @@

emptyField -
+

Remove all fields of the query result

@@ -3763,7 +3764,7 @@

emptyFu -
+

Remove all influx ql functions

@@ -3883,7 +3884,7 @@

emptyGroup -
+

Empty influx ql group by

@@ -4001,7 +4002,7 @@

empt -
+

Empty influx ql measurements

@@ -4118,7 +4119,7 @@

multiQuery< -
+

Multi query

@@ -4221,7 +4222,7 @@

removeFiel -
+

Remove the field of the query result

@@ -4380,7 +4381,7 @@

removeF -
+

Remove influx ql function

@@ -4596,7 +4597,7 @@

removeGrou -
+

Remove influx ql group by

@@ -4764,7 +4765,7 @@

remo -
+

Remove influx ql measurement

@@ -4931,7 +4932,7 @@

subQuery +

Set the sub query string, it will get the current ql for sub query and clean the query options

@@ -5034,7 +5035,7 @@

toSelect +

Get the influx select ql

@@ -5160,7 +5161,7 @@

where +

Add the influx ql where condition, alias for condition

@@ -5386,12 +5387,14 @@
Returns:

- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + \ No newline at end of file diff --git a/docs/Reader.html b/docs/Reader.html index a2e6599..ad5053c 100644 --- a/docs/Reader.html +++ b/docs/Reader.html @@ -13,6 +13,7 @@ + @@ -47,7 +48,7 @@

Reader

-

Influxdb Reader extends InfluxQL

+

Influxdb Reader extends InfluxQL

@@ -62,7 +63,7 @@

Constructor

-

new Reader(client, queue)

+

new Reader(client, queue) → {Reader}

@@ -81,6 +82,9 @@

new ReaderSince: +
  • 2.2.0
+ @@ -113,7 +117,7 @@

new Reader +

Get the influxdb reader

@@ -220,6 +224,24 @@
Parameters:
+
Returns:
+ + + + +
+
+ Type +
+
+ +Reader + + +
+
+ + @@ -313,7 +335,7 @@

database +

Set the database for influx ql

@@ -390,7 +412,7 @@

end +

Set influx ql end time

@@ -470,7 +492,7 @@

fill +

Set the influx query result fill value for time intervals that have no data

@@ -551,7 +573,7 @@

into +

Set the measurement for select into

@@ -632,7 +654,7 @@

intoDatab -
+

Set the database for select into

@@ -713,7 +735,7 @@

intoRP +

Set the rp for select into

@@ -726,7 +748,7 @@

intoRPExample

const ql = new QL('mydb');
-ql.mearsurement = 'http';
+ql.measurement = 'http';
 ql.rp = 'my-rp';
 ql.intoDatabase = 'mydb copy';
 ql.into = 'http copy';
@@ -794,7 +816,7 @@ 

limit +

Set influx ql query result point limit

@@ -876,7 +898,7 @@

measuremen -
+

Set influx ql measurement

@@ -955,7 +977,7 @@

offset +

Set influx ql query offset of the result

@@ -1035,7 +1057,7 @@

order +

Set the influx query result order of time

@@ -1116,7 +1138,7 @@

relation +

Get influx ql default where relation

@@ -1194,7 +1216,7 @@

RP +

Set influx ql retention policy

@@ -1274,7 +1296,7 @@

slimit +

Set influx query result series limit

@@ -1353,7 +1375,7 @@

soffset +

Set influx ql offset series in the query results

@@ -1432,7 +1454,7 @@

start +

Set influx ql start time

@@ -1524,7 +1546,7 @@

tz +

Set influx ql time zone

@@ -1605,7 +1627,7 @@

addCalcul -
+

Add influx ql calculate, use addFunction instead of it.

@@ -1737,8 +1759,10 @@

addFieldInherited From: -

@@ -148,12 +160,14 @@

Installation

$ npm install
 
- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + \ No newline at end of file diff --git a/docs/lib_client.js.html b/docs/lib_client.js.html index ddd313b..7256038 100644 --- a/docs/lib_client.js.html +++ b/docs/lib_client.js.html @@ -13,6 +13,7 @@ + @@ -285,7 +286,7 @@

lib/client.js

* @return {String} * @since 2.2.0 * @example - * const formatType = clinet.format; + * const formatType = client.format; * console.info(formatType); * // => undefined */ @@ -354,7 +355,7 @@

lib/client.js

* use: 1000, * }) * .queue(); - * console.info(clinet.writeQueueLength); + * console.info(client.writeQueueLength); * // => 2 */ get writeQueueLength() { @@ -372,7 +373,7 @@

lib/client.js

* client.query('login') * .set({limit: 1}) * .queue(); - * console.info(clinet.queryQueueLength); + * console.info(client.queryQueueLength); * // => 2 */ get queryQueueLength() { @@ -776,13 +777,13 @@

lib/client.js

* @return {Promise} * @since 2.2.0 * @example - * const clinet = new Influx('http://127.0.0.1:8086/mydb') + * const client = new Influx('http://127.0.0.1:8086/mydb') * client.queryRaw('select * from "http"') * .then(console.info) * .catch(console.error); * * @example - * const clinet = new Influx('http://127.0.0.1:8086/mydb') + * const client = new Influx('http://127.0.0.1:8086/mydb') * client.queryRaw('select * from "login"', 'testdb') * .then(console.info) * .catch(console.error); @@ -1045,12 +1046,14 @@

lib/client.js


- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + diff --git a/docs/lib_reader.js.html b/docs/lib_reader.js.html index 45b4638..eb149ab 100644 --- a/docs/lib_reader.js.html +++ b/docs/lib_reader.js.html @@ -13,6 +13,7 @@ + @@ -266,12 +267,14 @@

lib/reader.js


- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + diff --git a/docs/lib_writer.js.html b/docs/lib_writer.js.html index 6059347..975ee65 100644 --- a/docs/lib_writer.js.html +++ b/docs/lib_writer.js.html @@ -13,6 +13,7 @@ + @@ -349,12 +350,14 @@

lib/writer.js


- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + diff --git a/docs/node_modules_influx-ql_lib_ql.js.html b/docs/node_modules_influx-ql_lib_ql.js.html index 2c49bfd..d2ef3ad 100644 --- a/docs/node_modules_influx-ql_lib_ql.js.html +++ b/docs/node_modules_influx-ql_lib_ql.js.html @@ -13,6 +13,7 @@ + @@ -126,8 +127,8 @@

node_modules/influx-ql/lib/ql.js

if (!isString(key)) { return key; } - // key + x - if (key.indexOf('+') !== -1) { + // key +-*/ x + if (/[\\+\-\\*\\/]/.test(key)) { return key; } return `"${key}"`; @@ -277,11 +278,11 @@

node_modules/influx-ql/lib/ql.js

if (conditions.length) { const joinKey = ` ${data.relation} `; - arr.push(`where ${conditions.sort().join(joinKey)}`); + arr.push(`where ${conditions.join(joinKey)}`); } if (groups && groups.length) { - arr.push(`group by ${groups.sort().map(convertGroupValue).join(',')}`); + arr.push(`group by ${groups.map(convertGroupValue).join(',')}`); if (!isNil(data.fill)) { arr.push(`fill(${data.fill})`); @@ -498,7 +499,7 @@

node_modules/influx-ql/lib/ql.js

* @since 2.0.0 * @example * const ql = new QL('mydb'); - * ql.mearsurement = 'http'; + * ql.measurement = 'http'; * ql.rp = 'my-rp'; * ql.intoDatabase = 'mydb copy'; * ql.into = 'http copy'; @@ -1322,7 +1323,7 @@

node_modules/influx-ql/lib/ql.js

.forEach(items => selectFields.push.apply(selectFields, items)); } if (selectFields.length) { - arr.push(selectFields.sort().join(',')); + arr.push(selectFields.join(',')); } else { arr.push('*'); } @@ -1406,6 +1407,15 @@

node_modules/influx-ql/lib/ql.js

data.rp = ''; data.intoRP = ''; data.subQuery = ''; + data.start = ''; + data.end = ''; + data.limit = 0; + data.slimit = 0; + data.offset = 0; + data.soffset = 0; + data.tz = ''; + data.order = ''; + data.fill = null; } toCQ() { @@ -1535,12 +1545,14 @@

node_modules/influx-ql/lib/ql.js


- Documentation generated by JSDoc 3.5.5 on Tue Mar 19 2019 17:31:33 GMT+1300 (New Zealand Daylight Time) using the docdash theme. + Documentation generated by JSDoc 3.6.7 on Tue Aug 03 2021 10:03:15 GMT-0400 (Eastern Daylight Time) using the docdash theme.
+ + diff --git a/docs/scripts/collapse.js b/docs/scripts/collapse.js index 4525c17..327039f 100644 --- a/docs/scripts/collapse.js +++ b/docs/scripts/collapse.js @@ -1,11 +1,20 @@ function hideAllButCurrent(){ //by default all submenut items are hidden - $("nav > ul > li > ul li").hide(); + //but we need to rehide them for search + document.querySelectorAll("nav > ul > li > ul li").forEach(function(parent) { + parent.style.display = "none"; + }); //only current page (if it exists) should be opened - var file = window.location.pathname.split("/").pop(); - $("nav > ul > li > a[href^='"+file+"']").parent().find("> ul li").show(); + var file = window.location.pathname.split("/").pop().replace(/\.html/, ''); + document.querySelectorAll("nav > ul > li > a").forEach(function(parent) { + var href = parent.attributes.href.value.replace(/\.html/, ''); + if (file === href) { + parent.parentNode.querySelectorAll("ul li").forEach(function(elem) { + elem.style.display = "block"; + }); + } + }); } -$( document ).ready(function() { - hideAllButCurrent(); -}); \ No newline at end of file + +hideAllButCurrent(); \ No newline at end of file diff --git a/docs/scripts/nav.js b/docs/scripts/nav.js new file mode 100644 index 0000000..6dd8313 --- /dev/null +++ b/docs/scripts/nav.js @@ -0,0 +1,12 @@ +function scrollToNavItem() { + var path = window.location.href.split('/').pop().replace(/\.html/, ''); + document.querySelectorAll('nav a').forEach(function(link) { + var href = link.attributes.href.value.replace(/\.html/, ''); + if (path === href) { + link.scrollIntoView({block: 'center'}); + return; + } + }) + } + + scrollToNavItem(); diff --git a/docs/scripts/polyfill.js b/docs/scripts/polyfill.js new file mode 100644 index 0000000..44b4c92 --- /dev/null +++ b/docs/scripts/polyfill.js @@ -0,0 +1,4 @@ +//IE Fix, src: https://www.reddit.com/r/programminghorror/comments/6abmcr/nodelist_lacks_foreach_in_internet_explorer/ +if (typeof(NodeList.prototype.forEach)!==typeof(alert)){ + NodeList.prototype.forEach=Array.prototype.forEach; +} \ No newline at end of file diff --git a/docs/scripts/search.js b/docs/scripts/search.js index 9d17d8d..546c82f 100644 --- a/docs/scripts/search.js +++ b/docs/scripts/search.js @@ -1,47 +1,83 @@ -$( document ).ready(function() { - var searchAttr = 'data-search-mode'; - jQuery.expr[':'].Contains = function(a,i,m){ - return (a.textContent || a.innerText || "").toUpperCase().indexOf(m[3].toUpperCase())>=0; - }; - //on search - $("#nav-search").on("keyup", function(event) { - var search = $(this).val(); - if (!search) { - //no search, show all results - document.documentElement.removeAttribute(searchAttr); - $("nav > ul > li").not('.level-hide').show(); +var searchAttr = 'data-search-mode'; +function contains(a,m){ + return (a.textContent || a.innerText || "").toUpperCase().indexOf(m) !== -1; +}; - if(typeof hideAllButCurrent === "function"){ - //let's do what ever collapse wants to do - hideAllButCurrent(); - } - else{ - //menu by default should be opened - $("nav > ul > li > ul li").show(); - } +//on search +document.getElementById("nav-search").addEventListener("keyup", function(event) { + var search = this.value.toUpperCase(); + + if (!search) { + //no search, show all results + document.documentElement.removeAttribute(searchAttr); + + document.querySelectorAll("nav > ul > li:not(.level-hide)").forEach(function(elem) { + elem.style.display = "block"; + }); + + if (typeof hideAllButCurrent === "function"){ + //let's do what ever collapse wants to do + hideAllButCurrent(); + } else { + //menu by default should be opened + document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) { + elem.style.display = "block"; + }); } - else{ - //we are searching - document.documentElement.setAttribute(searchAttr, ''); + } else { + //we are searching + document.documentElement.setAttribute(searchAttr, ''); - //show all parents - $("nav > ul > li").show(); - //hide all results - $("nav > ul > li > ul li").hide(); - //show results matching filter - $("nav > ul > li > ul").find("a:Contains("+search+")").parent().show(); - //hide parents without children - $("nav > ul > li").each(function(){ - if($(this).find("a:Contains("+search+")").length == 0 && $(this).children("ul").length === 0){ - //has no child at all and does not contain text - $(this).hide(); + //show all parents + document.querySelectorAll("nav > ul > li").forEach(function(elem) { + elem.style.display = "block"; + }); + //hide all results + document.querySelectorAll("nav > ul > li > ul li").forEach(function(elem) { + elem.style.display = "none"; + }); + //show results matching filter + document.querySelectorAll("nav > ul > li > ul a").forEach(function(elem) { + if (!contains(elem.parentNode, search)) { + return; + } + elem.parentNode.style.display = "block"; + }); + //hide parents without children + document.querySelectorAll("nav > ul > li").forEach(function(parent) { + var countSearchA = 0; + parent.querySelectorAll("a").forEach(function(elem) { + if (contains(elem, search)) { + countSearchA++; + } + }); + + var countUl = 0; + var countUlVisible = 0; + parent.querySelectorAll("ul").forEach(function(ulP) { + // count all elements that match the search + if (contains(ulP, search)) { + countUl++; } - else if($(this).find("a:Contains("+search+")").length == 0 && $(this).find("ul").children(':visible').length == 0){ - //has no visible child and does not contain text - $(this).hide(); + + // count all visible elements + var children = ulP.children + for (i=0; i