Skip to main content

HotDBInflux

hotstaq / Modules / HotDBInflux

Class: HotDBInflux

The Influx database connection.

Hierarchy​

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new HotDBInflux(db?, type?, schema?)

Parameters​

NameTypeDefault value
dbInfluxDBnull
typestring"influx"
schemaInfluxSchemanull

Overrides​

HotDB.constructor

Defined in​

schemas/HotDBInflux.ts:21

Properties​

connectionStatus​

• connectionStatus: ConnectionStatus

The connection status.

Inherited from​

HotDB.connectionStatus

Defined in​

HotDB.ts:30


db​

• db: InfluxDB

The connection to the database (or the driver).

Inherited from​

HotDB.db

Defined in​

HotDB.ts:26


multiQuery​

• multiQuery: undefined

Overrides​

HotDB.multiQuery

Defined in​

schemas/HotDBInflux.ts:69


queryApi​

• queryApi: QueryApi

The Influx query api.

Defined in​

schemas/HotDBInflux.ts:19


queryOne​

• queryOne: undefined

Overrides​

HotDB.queryOne

Defined in​

schemas/HotDBInflux.ts:70


schema​

• schema: InfluxSchema

The db schema. This will generate a database structure and keep it maintained as needed.

Inherited from​

HotDB.schema

Defined in​

HotDB.ts:35


syncTable​

• syncTable: undefined

Defined in​

schemas/HotDBInflux.ts:72


tableCheck​

• tableCheck: undefined

Overrides​

HotDB.tableCheck

Defined in​

schemas/HotDBInflux.ts:73


type​

• type: string

The database type.

Inherited from​

HotDB.type

Defined in​

HotDB.ts:22


writeApi​

• writeApi: WriteApi

The Influx write api.

Defined in​

schemas/HotDBInflux.ts:15

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​

NameType
pointPoint

Returns​

void

Defined in​

schemas/HotDBInflux.ts:88


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​

NameType
pointsPoint[]

Returns​

void

Defined in​

schemas/HotDBInflux.ts:100


connect​

â–¸ connect(connectionInfo): Promise<any[]>

Connect to the database.

Parameters​

NameType
connectionInfoHotDBConnectionInterface

Returns​

Promise<any[]>

Overrides​

HotDB.connect

Defined in​

schemas/HotDBInflux.ts:29


dbCheck​

â–¸ Protected dbCheck(): void

Checks to see if this has a database connection.

Returns​

void

Defined in​

schemas/HotDBInflux.ts:78


disconnect​

â–¸ disconnect(): Promise<void>

Disconnect from the server.

Returns​

Promise<void>

Overrides​

HotDB.disconnect

Defined in​

schemas/HotDBInflux.ts:203


query​

â–¸ query(queryString, values?, nextFunc?, errorFunc?): Promise<void>

The query to make.

Parameters​

NameTypeDefault value
queryStringstringundefined
valuesany[][]
nextFunc(row: string[], tableMeta: FluxTableMetaData) => voidnull
errorFunc(error: Error) => voidnull

Returns​

Promise<void>

Overrides​

HotDB.query

Defined in​

schemas/HotDBInflux.ts:160


sendPoints​

â–¸ sendPoints(): Promise<void>

Writes all stored points to the database.

Returns​

Promise<void>

Defined in​

schemas/HotDBInflux.ts:111


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​

NameType
pointPoint

Returns​

Promise<void>

Defined in​

schemas/HotDBInflux.ts:134


writePoints​

â–¸ writePoints(points): Promise<void>

Write points to the database. This will call close and send the point immediately to the database.

Parameters​

NameType
pointsPoint[]

Returns​

Promise<void>

Defined in​

schemas/HotDBInflux.ts:147