ReadonlynameThe name of the store (e.g. 'mongodb', 'redis', 'dynamodb')
ReadonlylibraryThe client library being used
Creates the underlying InfluxDB client and verifies the url/token/org
combination by issuing a trivial Flux query (buckets() |> limit(n:1)).
InfluxDB's HTTP client has no persistent socket to "connect", so this
is the closest equivalent to the connect-time failure surfaced by
socket-based stores (bad host, refused connection, invalid token/org).
Flushes and closes every write API opened by this store (so no buffered point is silently dropped), then drops the client.
Returns the underlying InfluxDB client for anything not wrapped here.
Returns the memoized WriteApi for the given (org, bucket, precision),
creating it on first use. Returned instances buffer writes - see the
write-buffering note in this file's header comment.
Write a single already-built Point. Buffered - call flush() to force delivery.
Write multiple already-built Points. Buffered - call flush() to force delivery.
Write a single raw line-protocol record. Buffered - call flush() to force delivery.
Write multiple raw line-protocol records. Buffered - call flush() to force delivery.
Convenience: build a Point from a plain object and write it.
Convenience: build and write a batch of Points from plain objects.
Flushes the write API for the given scope, sending any buffered points/lines to the server immediately. Resolves once the flush completes (or immediately if nothing was ever written for that scope).
Flushes every write API this store has opened, across all buckets/orgs/precisions.
Flushes and closes the write API for the given scope, releasing it so a subsequent write for the same scope opens a fresh one.
Streams a Flux query's result rows, already converted to plain
objects via each row's table metadata (equivalent to
tableMeta.toObject(row.values)). Suitable for for-await loops
over large result sets without buffering everything in memory.
Streams a Flux query's raw Rows (values + table metadata),
without the toObject conversion query() applies.
Executes a Flux query and collects every result row into an array via
the returned Promise. Use with caution on large result sets - the
whole result is buffered in memory. Prefer query()/queryRows()
for streaming.
OptionalrowMapper: (values: string[], tableMeta: FluxTableMetaData) => T | undefinedExecutes a Flux query and returns the full annotated-CSV response as a string.
ORM create: model one record as a line-protocol point per schema
(tags vs fields vs timestamp) and write it. Buffered - this method flushes
so the point is durable before it resolves.
ORM findAll. Generates Flux from measurement/where/order/range;
where predicates are pushed into Flux when expressible, otherwise the
rows are collected and filtered in memory with the shared matcher.
limit/offset are applied to the (sorted) result.
ORM count: number of points/rows matching the query.
Aggregate (and optionally downsample) a field. Generates Flux using either
a bare aggregate (mean(), sum(), ...) or aggregateWindow(every, fn)
when window is set, grouping by groupBy tags first. Returns the result
rows so callers never hand-write Flux for standard aggregates.
ORM update is unsupported: InfluxDB points are immutable, so there is no
safe in-place row update to emulate. Write a new point (create) with the
corrected values instead, or delete + rewrite via destroy. Throws
a typed capability error rather than silently doing nothing.
ORM destroy: delete points from measurement within a time range,
optionally narrowed by an equality predicate on tags. Uses InfluxDB's
delete API (from the optional @influxdata/influxdb-client-apis package,
required lazily). where supports only equality on tags/_measurement/
_field - the delete API's predicate grammar - and throws a typed error
for anything else, since a Flux-style filter cannot be emulated safely here.
InfluxDBStorewraps@influxdata/influxdb-client'sInfluxDBclient and exposes InfluxDB's write API (point/line-protocol writes, buffered with explicit flush/close) and query API (Flux, streamed row-by-row) as a typed, promise/async-iterable-based API.