Creates a new instance of the InfluxDBClient
from ClientOptions
.
client options
Creates a new instance of the InfluxDBClient
from connection string.
connection string
https://us-east-1-1.aws.cloud2.influxdata.com/?token=my-token&database=my-database
Supported query parameters:
- token - authentication token (required)
- authScheme - token authentication scheme. Not set for Cloud access, set to 'Bearer' for Edge.
- database - database (bucket) name
- timeout - I/O timeout
- precision - timestamp precision when writing data
- gzipThreshold - payload size threshold for gzipping data
Creates a new instance of the InfluxDBClient
from environment variables.
Supported variables:
Execute a query and return the results as an async generator.
The query string.
Optional
database: stringThe name of the database to query.
The options for the query (default: { type: 'sql' }).
An async generator that yields maps of string keys to any values.
Execute a query and return the results as an async generator.
The query string.
Optional
database: stringThe name of the database to query.
The type of query (default: {type: 'sql'}).
An async generator that yields PointValues object.
Write data into specified database.
data to write
Optional
database: stringdatabase to write into
Optional
org: stringorganization to write into
Optional
writeOptions: Partial<WriteOptions>write options
InfluxDBClient
for interacting with an InfluxDB server, simplifying common operations such as writing, querying.