HotDBInflux
hotstaq / Modules / HotDBInflux
Class: HotDBInflux
The Influx database connection.
Hierarchy​
HotDB
<InfluxDB
,void
,InfluxSchema
>↳
HotDBInflux
Table of contents​
Constructors​
Properties​
Methods​
Constructors​
constructor​
• new HotDBInflux(db?
, type?
, schema?
)
Parameters​
Name | Type | Default value |
---|---|---|
db | InfluxDB | null |
type | string | "influx" |
schema | InfluxSchema | null |
Overrides​
Defined in​
Properties​
connectionStatus​
• connectionStatus: ConnectionStatus
The connection status.
Inherited from​
Defined in​
db​
• db: InfluxDB
The connection to the database (or the driver).
Inherited from​
Defined in​
multiQuery​
• multiQuery: undefined
Overrides​
Defined in​
queryApi​
• queryApi: QueryApi
The Influx query api.
Defined in​
queryOne​
• queryOne: undefined
Overrides​
Defined in​
schema​
• schema: InfluxSchema
The db schema. This will generate a database structure and keep it maintained as needed.
Inherited from​
Defined in​
syncTable​
• syncTable: undefined
Defined in​
tableCheck​
• tableCheck: undefined
Overrides​
Defined in​
type​
• type: string
The database type.
Inherited from​
Defined in​
writeApi​
• writeApi: WriteApi
The Influx write api.
Defined in​
Methods​
addPoint​
â–¸ addPoint(point
): void
Write to the database. This will only store the point. It will not send to the database unless sendPoints is called.
Parameters​
Name | Type |
---|---|
point | Point |
Returns​
void
Defined in​
addPoints​
â–¸ addPoints(points
): void
Write to the database. This will only store the points. It will not send to the database unless sendPoints is called.
Parameters​
Name | Type |
---|---|
points | Point [] |
Returns​
void
Defined in​
connect​
â–¸ connect(connectionInfo
): Promise
<any
[]>
Connect to the database.
Parameters​
Name | Type |
---|---|
connectionInfo | HotDBConnectionInterface |
Returns​
Promise
<any
[]>
Overrides​
Defined in​
dbCheck​
â–¸ Protected
dbCheck(): void
Checks to see if this has a database connection.
Returns​
void
Defined in​
disconnect​
â–¸ disconnect(): Promise
<void
>
Disconnect from the server.
Returns​
Promise
<void
>
Overrides​
Defined in​
query​
â–¸ query(queryString
, values?
, nextFunc?
, errorFunc?
): Promise
<void
>
The query to make.
Parameters​
Name | Type | Default value |
---|---|---|
queryString | string | undefined |
values | any [] | [] |
nextFunc | (row : string [], tableMeta : FluxTableMetaData ) => void | null |
errorFunc | (error : Error ) => void | null |
Returns​
Promise
<void
>
Overrides​
Defined in​
sendPoints​
â–¸ sendPoints(): Promise
<void
>
Writes all stored points to the database.
Returns​
Promise
<void
>
Defined in​
write​
â–¸ write(point
): Promise
<void
>
Write to the database. This will call close and send the point immediately to the database. Do not use this to send lots of data. If you're sending batches of data, be sure to use writePoints.
Parameters​
Name | Type |
---|---|
point | Point |
Returns​
Promise
<void
>
Defined in​
writePoints​
â–¸ writePoints(points
): Promise
<void
>
Write points to the database. This will call close and send the point immediately to the database.
Parameters​
Name | Type |
---|---|
points | Point [] |
Returns​
Promise
<void
>