diff --git a/api.md b/api.md index 59ea694..c5696e9 100644 --- a/api.md +++ b/api.md @@ -5,7 +5,7 @@ [](https://www.npmjs.org/package/influxdb-nodejs) [](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/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 @@Get the available list
Get the database
Get the specified precision of epoch timestamps
Set the specified precision of epoch timestamps.It should be [h,m,s,ms,u,ns]
Set the query data format type
+Get the query data format type
client.format = 'json';
-console.info(client.format);
-// => 'json'
+ const formatType = client.format;
+console.info(formatType);
+// => undefined
@@ -499,7 +500,7 @@ Get the query data format type
+Set the query data format type
const formatType = clinet.format;
-console.info(formatType);
-// => undefined
+ client.format = 'json';
+console.info(client.format);
+// => 'json'
@@ -614,7 +615,7 @@ Get the query queue length
Set the http request timeout value.
+Set the http request timeout value, the unit is ms. The default is 0, no timeout.
client.timeout = 1000;
-console.info(client.timeout);
-// => 1000
+ const ms = client.timeout;
+console.info(ms);
+// => 0
@@ -723,7 +724,7 @@ Set the http request timeout value, the unit is ms. The default is 0, no timeout.
+Set the http request timeout value.
const ms = client.timeout;
-console.info(ms);
-// => 0
+ client.timeout = 1000;
+console.info(client.timeout);
+// => 1000
@@ -840,7 +841,7 @@ Get the unavailable list
Get the write queue length
Set the load balance algorithm
Add plugin function
Create the database of the connection uri
Create retention policy
Drop the database of the connection uri
Drop retention policy
Update one record (latest)
Listen on the event, not is support: 'queue', 'writeQueue', 'queryQueue'
Get the influxdb query reader
Use post for the influxdb query, such as create user
Use influx ql to query the data
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:
+
+