InfluxElixir.Client.Local.SQLError (InfluxElixir v0.1.40)

Copy Markdown View Source

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.

Every constructor returns %{status: status, body: body}, the shape Client.HTTP returns for a non-success response.

Summary

Types

t()

An HTTP-style error answer.

Functions

The engine's internal error for a BETWEEN whose operand and bound have no common type (a type coercion error, status 500).

What Client.HTTP returns when the engine fails a query after it has sent 200: it closes the connection mid-response. An integer divided by zero, an overflowing abs, a cast that cannot be performed and a bin of zero width fail this way.

A planning error found by the type coercion pass, which the engine wraps as type_coercion\ncaused by\nError during planning: <message>.

The physical planner's error for a WHERE whose conjuncts on time leave no instant (time > X AND time < X), status 500.

The engine's internal error for a WHERE that leaves a numeric column an empty interval (status 500), as raised for the first conjunct of the filter: a lower bound reads lhs:Null, rhs:<type>, an upper bound lhs:<type>, rhs:Null, and an = is the intersectable variant with a null on the left.

The Arrow kernel's error for the negation of the smallest integer of a type that the engine's interval analysis meets while it reads a WHERE's constants, status 500. text is the integer, as printed (-9223372036854775808).

The engine's planning error, Error during planning: <message>.

The refusal of a query the double does not model. The Client.Local: prefix tells a reader that the double, not InfluxDB, declined.

An error the optimizer's simplify_expressions pass raises while it folds a constant (an unparseable timestamp string, an invalid regular expression): Optimizer rule 'simplify_expressions' failed\ncaused by\n<message>, status 500. It comes after the planner's own errors.

The engine's SQL tokenizer error at a position: SQL error: TokenizerError("<message> at Line: <line>, Column: <column>").

Types

t()

@type t() :: %{status: pos_integer(), body: binary()}

An HTTP-style error answer.

Functions

between_coercion(operand_type, bound_type)

@spec between_coercion(binary(), binary()) :: t()

The engine's internal error for a BETWEEN whose operand and bound have no common type (a type coercion error, status 500).

closed()

@spec closed() :: {:connection_error, Mint.TransportError.t()}

What Client.HTTP returns when the engine fails a query after it has sent 200: it closes the connection mid-response. An integer divided by zero, an overflowing abs, a cast that cannot be performed and a bin of zero width fail this way.

coercion(message)

@spec coercion(binary()) :: t()

A planning error found by the type coercion pass, which the engine wraps as type_coercion\ncaused by\nError during planning: <message>.

empty_range()

@spec empty_range() :: t()

The physical planner's error for a WHERE whose conjuncts on time leave no instant (time > X AND time < X), status 500.

interval(op, type)

@spec interval(atom(), :int64 | :uint64 | :float64) :: t()

The engine's internal error for a WHERE that leaves a numeric column an empty interval (status 500), as raised for the first conjunct of the filter: a lower bound reads lhs:Null, rhs:<type>, an upper bound lhs:<type>, rhs:Null, and an = is the intersectable variant with a null on the left.

overflow(text)

@spec overflow(binary()) :: t()

The Arrow kernel's error for the negation of the smallest integer of a type that the engine's interval analysis meets while it reads a WHERE's constants, status 500. text is the integer, as printed (-9223372036854775808).

planning(message)

@spec planning(binary()) :: t()

The engine's planning error, Error during planning: <message>.

refusal(message)

@spec refusal(binary()) :: t()

The refusal of a query the double does not model. The Client.Local: prefix tells a reader that the double, not InfluxDB, declined.

simplify(message)

@spec simplify(binary()) :: t()

An error the optimizer's simplify_expressions pass raises while it folds a constant (an unparseable timestamp string, an invalid regular expression): Optimizer rule 'simplify_expressions' failed\ncaused by\n<message>, status 500. It comes after the planner's own errors.

tokenizer(message, line, column)

@spec tokenizer(binary(), pos_integer(), pos_integer()) :: t()

The engine's SQL tokenizer error at a position: SQL error: TokenizerError("<message> at Line: <line>, Column: <column>").