influxdb-client-js

InfluxDB 2.0 JavaScript client

View the Project on GitHub influxdata/influxdb-client-js

Home > @influxdata/influxdb-client-giraffe > queryToTable

queryToTable() function

Executes a flux query and collects results into a Giraffe’s Table.

Signature:

declare function queryToTable(queryApi: QueryApi, query: string | ParameterizedQuery, tableFactory: GiraffeTableFactory, tableOptions?: TableOptions): Promise<Table>;

Parameters

Parameter Type Description
queryApi QueryApi InfluxDB client’s QueryApi instance
query string | ParameterizedQuery query to execute
tableFactory GiraffeTableFactory creates a new Giraffe table
tableOptions TableOptions (Optional) tableOptions allows to filter or even stop the processing of rows, specify maximum rows or restrict the columns to collect.

Returns:

Promise<Table>

Promise with query results