# InfluxElixir v0.1.40 - Table of Contents

Elixir client library for InfluxDB v3 with v2 compatibility

## Pages

- [InfluxElixir](readme.md)
- [Changelog](changelog.md)
- [LICENSE](license.md)

- Guides
  - [Testing with LocalClient](testing-with-local-client.md)

## Modules

- [InfluxElixir](InfluxElixir.md): Elixir client library for InfluxDB v3 with v2 compatibility.
- [InfluxElixir.Admin.Buckets](InfluxElixir.Admin.Buckets.md): v2 bucket CRUD operations for backwards compatibility.
- [InfluxElixir.Admin.Databases](InfluxElixir.Admin.Databases.md): v3 database CRUD operations via `/api/v3/configure/database`.
- [InfluxElixir.Admin.Health](InfluxElixir.Admin.Health.md): Health and ping checks for InfluxDB instances.
- [InfluxElixir.Admin.Tokens](InfluxElixir.Admin.Tokens.md): InfluxDB 3 token management, by token name.
- [InfluxElixir.Application](InfluxElixir.Application.md): OTP Application entry point for InfluxElixir.
- [InfluxElixir.Client](InfluxElixir.Client.md): Behaviour defining the InfluxDB client contract.
- [InfluxElixir.Client.HTTP](InfluxElixir.Client.HTTP.md): Production InfluxDB client implementation using Finch.
- [InfluxElixir.Client.Local](InfluxElixir.Client.Local.md): In-memory InfluxDB client for fast, isolated testing.
- [InfluxElixir.Client.Local.Body](InfluxElixir.Client.Local.Body.md): Reads a write request's body as the engine does before it parses a line
(verified against InfluxDB 3 Core and InfluxDB 2.7).
- [InfluxElixir.Client.Local.DatabaseRules](InfluxElixir.Client.Local.DatabaseRules.md): InfluxDB 3's rules for database names and counts, as `Client.Local`
applies them to `create_database/3`, to a write that creates its database
and to `start/1` (all verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.Flux](InfluxElixir.Client.Local.Flux.md): The Flux subset `InfluxElixir.Client.Local` answers, with InfluxDB 2's
semantics (verified against `influxdb:2.7`; see
`docs/design/2026-09-24_local-flux-pipeline.md`).
- [InfluxElixir.Client.Local.Format](InfluxElixir.Client.Local.Format.md): Answers a query's `format:` option for `InfluxElixir.Client.Local` as
`Client.HTTP` answers it from InfluxDB 3 (verified against Core)
- [InfluxElixir.Client.Local.InfluxQL](InfluxElixir.Client.Local.InfluxQL.md): The InfluxQL `SELECT` subset `InfluxElixir.Client.Local` answers, shaped
the way InfluxDB 3 answers it (verified against the engine; see
`docs/design/2026-09-23_local-influxql.md`).
- [InfluxElixir.Client.Local.LineProtocolParser](InfluxElixir.Client.Local.LineProtocolParser.md): Line protocol parser for `InfluxElixir.Client.Local`.
- [InfluxElixir.Client.Local.SQLAggregate](InfluxElixir.Client.Local.SQLAggregate.md): The aggregates of a SQL select list for `InfluxElixir.Client.Local`, over
the points of one group, as InfluxDB 3 computes them (verified against
Core).
- [InfluxElixir.Client.Local.SQLBind](InfluxElixir.Client.Local.SQLBind.md): Binds the `$name` placeholders of a parsed query.
- [InfluxElixir.Client.Local.SQLBounds](InfluxElixir.Client.Local.SQLBounds.md): The engine's failure on a `WHERE` that leaves a numeric column no value
(verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLCast](InfluxElixir.Client.Local.SQLCast.md): `CAST(expr AS type)` as DataFusion performs it (verified against InfluxDB 3
Core).
- [InfluxElixir.Client.Local.SQLClauses](InfluxElixir.Client.Local.SQLClauses.md): The `GROUP BY` and `ORDER BY` clauses of a SQL text, as DataFusion reads
them (verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLCondition](InfluxElixir.Client.Local.SQLCondition.md): Evaluates a parsed `WHERE` against a point for `InfluxElixir.Client.Local`
with SQL's three-valued logic and DataFusion's comparison semantics
(verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLError](InfluxElixir.Client.Local.SQLError.md): The error maps `InfluxElixir.Client.Local` answers a SQL query with: the
engine's own words under the engine's status, and the `Client.Local:`
refusal for what the double declines to model.
- [InfluxElixir.Client.Local.SQLEval](InfluxElixir.Client.Local.SQLEval.md): Evaluates a SQL expression (`InfluxElixir.Client.Local.SQLExpr`) against one
point, with the engine's number types (see
`InfluxElixir.Client.Local.SQLNumber`): a `UInt64` column
(`{:uint_col, name}`, which `InfluxElixir.Client.Local.SQLTyping` puts where
the store registered one) reads as a `UInt64`, so `u / 2` is the decimal
division the engine makes of it.
- [InfluxElixir.Client.Local.SQLExecutor](InfluxElixir.Client.Local.SQLExecutor.md): Executes a parsed SQL query for `InfluxElixir.Client.Local`.
- [InfluxElixir.Client.Local.SQLExpr](InfluxElixir.Client.Local.SQLExpr.md): The arithmetic expressions of a SQL text: a column, a literal, a `$name`
placeholder, an operation, a unary minus, a `CAST` or a call of one of
`InfluxElixir.Client.Local.SQLFunctions`. They stand in an aggregate's
argument, a projection, a `WHERE` operand and an `ORDER BY` term.
- [InfluxElixir.Client.Local.SQLFold](InfluxElixir.Client.Local.SQLFold.md): What the engine's optimizer finds when it folds the constants of a SQL
query, for `InfluxElixir.Client.Local` (verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLFunctions](InfluxElixir.Client.Local.SQLFunctions.md): The scalar math functions `Client.Local` evaluates in SQL expressions,
wherever an expression stands (`WHERE`, the select list, `ORDER BY`, an
aggregate's argument), as InfluxDB 3 does (verified against Core)
- [InfluxElixir.Client.Local.SQLGrouping](InfluxElixir.Client.Local.SQLGrouping.md): The engine's check that a projected plain column of an aggregate query is
grouped (verified against InfluxDB 3 Core): planning fails otherwise, and
its message lists what does satisfy the requirement, the `GROUP BY` terms
and then the aggregates in select order, each as the planner prints it.
The double refuses by name a query whose terms it cannot print.

- [InfluxElixir.Client.Local.SQLIdentifiers](InfluxElixir.Client.Local.SQLIdentifiers.md): DataFusion's identifier rules, applied to a SQL text before
`InfluxElixir.Client.Local.SQLParser` reads it (verified against
InfluxDB 3 Core)
- [InfluxElixir.Client.Local.SQLJoin](InfluxElixir.Client.Local.SQLJoin.md): `FROM a CROSS JOIN b` for `InfluxElixir.Client.Local`: every left point
paired with every right point, the right side's columns merged in as
fields. Rows are the left side's measurement and timestamp.
- [InfluxElixir.Client.Local.SQLLexer](InfluxElixir.Client.Local.SQLLexer.md): Reads a SQL text as the engine's tokenizer does, before
`InfluxElixir.Client.Local.SQLParser` looks at it (verified against
InfluxDB 3 Core)
- [InfluxElixir.Client.Local.SQLLimit](InfluxElixir.Client.Local.SQLLimit.md): `LIMIT n` and `OFFSET m`, in either order, end a statement. A clause is the
keyword followed by a value, so a column called `offset` (an operator or
keyword follows it) stays a column. The engine's answers (verified): a name
is its schema error (500), a number with a fraction, a string or a boolean
the type_coercion error naming the clause and the type, a negative number
the optimizer's error, 0 and NULL are fine. Planning comes before
optimizing, and LIMIT before OFFSET; a negative OFFSET is reported by
`push_down_limit` when a LIMIT is present and by `eliminate_limit` when it
is not. A `$name` is checked the same way once
`InfluxElixir.Client.Local.SQLBind` knows its value.

- [InfluxElixir.Client.Local.SQLLimits](InfluxElixir.Client.Local.SQLLimits.md): The ends of the engine's integer and float types, in one place for the SQL
modules of `InfluxElixir.Client.Local`.
- [InfluxElixir.Client.Local.SQLLiteral](InfluxElixir.Client.Local.SQLLiteral.md): The literals and names of a SQL text, as DataFusion reads them (verified
against InfluxDB 3 Core)
- [InfluxElixir.Client.Local.SQLMask](InfluxElixir.Client.Local.SQLMask.md): Reads quoted text out of the way. Every clause of a SQL text is located by a
regular expression, and a string literal can hold anything: a comma, `>`,
`limit 5`, `from t`. So the text is masked first — the body of each `'...'`
or `"..."` becomes filler, byte for byte, the quotes stay — the expression
runs over the mask, and what it found is cut out of the original at the same
offsets.
- [InfluxElixir.Client.Local.SQLNumber](InfluxElixir.Client.Local.SQLNumber.md): The numbers a SQL expression computes with in `InfluxElixir.Client.Local`,
typed as the engine types them (verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLParser](InfluxElixir.Client.Local.SQLParser.md): SQL parser for `InfluxElixir.Client.Local`.
- [InfluxElixir.Client.Local.SQLPlan](InfluxElixir.Client.Local.SQLPlan.md): The type errors the engine finds when it plans a SQL query, for
`InfluxElixir.Client.Local`, whether or not any row would reach the
expression (verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLPredicates](InfluxElixir.Client.Local.SQLPredicates.md): Flattens a parsed `WHERE` into its conjuncts, pushing a `NOT` in as the
engine's optimizer does, for the modules that reason about what a filter
leaves (`InfluxElixir.Client.Local.SQLBounds` for a numeric column,
`InfluxElixir.Client.Local.SQLRange` for `time`).
- [InfluxElixir.Client.Local.SQLRange](InfluxElixir.Client.Local.SQLRange.md): What a `WHERE` leaves of a scan's ranges, for `InfluxElixir.Client.Local`:
the failures the engine raises while planning the scan (verified against
InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLRow](InfluxElixir.Client.Local.SQLRow.md): How a stored point's columns read in a SQL query of
`InfluxElixir.Client.Local`: the value a column has, and the value a
point sorts, groups and picks on.

- [InfluxElixir.Client.Local.SQLSchema](InfluxElixir.Client.Local.SQLSchema.md): The schema errors of a SQL query for `InfluxElixir.Client.Local`: a column
the query names that no row has — in `SELECT`, an aggregate, `WHERE`,
`GROUP BY`, `ORDER BY` or `DISTINCT` — is the engine's schema error ("No
field named prod. Valid fields are ..."), not an empty or unsorted result.
The usual cause is a typo or a forgotten pair of quotes around a string
literal. With no rows the schema is unknown, so nothing is checked.
- [InfluxElixir.Client.Local.SQLSelect](InfluxElixir.Client.Local.SQLSelect.md): The select list of an aggregate or grouped query: `DATE_BIN(...) AS alias`,
`AGG(expr) AS alias`, the selectors, `first_value` / `last_value`, constants
and grouping columns (all verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.SQLSort](InfluxElixir.Client.Local.SQLSort.md): The ordering of values and rows for `InfluxElixir.Client.Local`'s SQL, as
the engine orders them (verified against InfluxDB 3 Core): `DateTime`s
chronologically, numbers by `InfluxElixir.Client.Local.SQLNumber` (a
`UInt64` or a decimal by its value, an infinity beyond every finite float),
nulls last when ascending and first when descending unless the query says
`NULLS FIRST` / `NULLS LAST`; it is not term order, which puts a nil before
every string and between `false` and `true`.

- [InfluxElixir.Client.Local.SQLTime](InfluxElixir.Client.Local.SQLTime.md): What a `time` comparand is, as InfluxDB 3 reads it (verified against Core)
- [InfluxElixir.Client.Local.SQLTyping](InfluxElixir.Client.Local.SQLTyping.md): Gives a SQL query's expressions the types the engine gives them, for
`InfluxElixir.Client.Local`.
- [InfluxElixir.Client.Local.SQLWhere](InfluxElixir.Client.Local.SQLWhere.md): The `WHERE` clause of a SQL text: a boolean expression over predicates
(verified against InfluxDB 3 Core).
- [InfluxElixir.Client.Local.Store](InfluxElixir.Client.Local.Store.md): The ETS store behind `InfluxElixir.Client.Local`: the one module that
knows the key layout.
- [InfluxElixir.Client.QueryParams](InfluxElixir.Client.QueryParams.md): The `params:` of a SQL query, as both clients send and read them.
- [InfluxElixir.Config](InfluxElixir.Config.md): Connection configuration validation and defaults.
- [InfluxElixir.Connection](InfluxElixir.Connection.md): Named connection manager for InfluxDB instances.
- [InfluxElixir.ConnectionSupervisor](InfluxElixir.ConnectionSupervisor.md): Per-connection supervisor using `:rest_for_one` strategy.
- [InfluxElixir.Flight.Client](InfluxElixir.Flight.Client.md): Arrow Flight gRPC client for high-throughput query transport.
- [InfluxElixir.Flight.FlatBuffer](InfluxElixir.Flight.FlatBuffer.md): Minimal FlatBuffer binary reader for Arrow IPC metadata.
- [InfluxElixir.Flight.Proto](InfluxElixir.Flight.Proto.md): Protobuf message definitions for the Apache Arrow Flight protocol.
- [InfluxElixir.Flight.Proto.FlightData](InfluxElixir.Flight.Proto.FlightData.md): A chunk of Arrow IPC data streamed from a `DoGet` call.
- [InfluxElixir.Flight.Proto.FlightDescriptor](InfluxElixir.Flight.Proto.FlightDescriptor.md): Describes how to locate or identify a Flight (a named dataset or query).
- [InfluxElixir.Flight.Proto.FlightEndpoint](InfluxElixir.Flight.Proto.FlightEndpoint.md): A `Ticket` paired with a list of `Location`s that can serve the data.
- [InfluxElixir.Flight.Proto.FlightInfo](InfluxElixir.Flight.Proto.FlightInfo.md): Metadata returned by `GetFlightInfo`, describing a result set.
- [InfluxElixir.Flight.Proto.FlightService.Service](InfluxElixir.Flight.Proto.FlightService.Service.md): gRPC service definition for the Arrow Flight protocol.
- [InfluxElixir.Flight.Proto.FlightService.Stub](InfluxElixir.Flight.Proto.FlightService.Stub.md): Generated gRPC client stub for `FlightService`.
- [InfluxElixir.Flight.Proto.HandshakeRequest](InfluxElixir.Flight.Proto.HandshakeRequest.md): Initial client message in the `Handshake` RPC.
- [InfluxElixir.Flight.Proto.HandshakeResponse](InfluxElixir.Flight.Proto.HandshakeResponse.md): Server response in the `Handshake` RPC.
- [InfluxElixir.Flight.Proto.Location](InfluxElixir.Flight.Proto.Location.md): A URI identifying where a Flight service is available.
- [InfluxElixir.Flight.Proto.Ticket](InfluxElixir.Flight.Proto.Ticket.md): An opaque bytes token identifying a result set.
- [InfluxElixir.Flight.Reader](InfluxElixir.Flight.Reader.md): Arrow IPC record batch decoder for Arrow Flight query results.
- [InfluxElixir.Query.Flux](InfluxElixir.Query.Flux.md): v2 Flux query executor for backwards compatibility.
- [InfluxElixir.Query.InfluxQL](InfluxElixir.Query.InfluxQL.md): v3 InfluxQL query executor for legacy query compatibility.
- [InfluxElixir.Query.ResponseParser](InfluxElixir.Query.ResponseParser.md): Parses InfluxDB query responses in JSON, JSONL, InfluxDB 3 CSV and Flux
annotated CSV formats, and passes Parquet bodies through untouched.
- [InfluxElixir.Query.SQL](InfluxElixir.Query.SQL.md): v3 SQL query builder and executor.
- [InfluxElixir.Query.SQLStream](InfluxElixir.Query.SQLStream.md): Streaming JSONL query results as a lazy Elixir Stream.
- [InfluxElixir.Supervisor](InfluxElixir.Supervisor.md): Top-level supervisor for InfluxElixir.
- [InfluxElixir.Telemetry](InfluxElixir.Telemetry.md): Telemetry event emission for write and query operations.
- [InfluxElixir.TestHelper](InfluxElixir.TestHelper.md): Test setup helpers for consuming applications.
- [InfluxElixir.Write.BatchWriter](InfluxElixir.Write.BatchWriter.md): GenServer-based batch writer with configurable flush intervals,
batch sizes, retry with exponential backoff, and backpressure.
- [InfluxElixir.Write.LineProtocol](InfluxElixir.Write.LineProtocol.md): Encodes Point structs into InfluxDB line protocol format.
- [InfluxElixir.Write.Point](InfluxElixir.Write.Point.md): Point struct representing a single InfluxDB data point.
- [InfluxElixir.Write.Writer](InfluxElixir.Write.Writer.md): Direct single-request write to InfluxDB.

- Exceptions
  - [InfluxElixir.StreamError](InfluxElixir.StreamError.md): Raised while consuming a streaming query result when the request cannot
produce rows.

