influxdb-client-js

InfluxDB 2.0 JavaScript client

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

Home > @influxdata/influxdb-client > QueryApi > collectLines

QueryApi.collectLines() method

CollectLines executes the query and collects all result lines in the returned Promise. This method is suitable to collect simple results. Use with caution, a possibly huge stream of lines is copied to memory.

Signature:

collectLines(query: string | ParameterizedQuery): Promise<Array<string>>;

Parameters

Parameter Type Description
query string | ParameterizedQuery query

Returns:

Promise<Array<string>>

Promise of returned csv lines