API Reference clickhouse_adapter_ecto v#0.1.0

Copy Markdown

Modules

A minimal Ecto.Adapters.SQL-based adapter for ClickHouse, backed by ChDriver (a native-protocol DBConnection driver).

DDL generation for Ecto.Migration support.

Clause and expression renderers used by Ecto.Adapters.ClickHouse.QueryBuilder to build SELECT statements: SELECT, FROM, WHERE, ORDER BY, LIMIT/OFFSET, boolean composition, and the expr/3 Ecto expression renderer (with its many clauses covering literals, functions, operators, and fragments). This is the file that grows every time a new Ecto fragment or operator is supported, so it stays focused purely on that.

Validated builders for ClickHouse-specific migration column types that have no direct Ecto.Migration.add/3 equivalent.

Quoting -- double quotes are accepted for identifiers (SELECT "id" FROM "events"); backticks work too, but double quotes are the ANSI-standard choice and match what the rest of the Ecto ecosystem (Postgres) expects, so that's what's used here. Single quotes remain reserved for string literals.

Statement generators for Ecto.Adapters.SQL.Connection: all/2, update_all/2, delete_all/1, insert/8, update/5, delete/5, and explain_query/4. These change for entirely different reasons than the expression/clause rendering in Ecto.Adapters.ClickHouse.Expression -- e.g. adding an expr/3 clause for a new Ecto fragment has nothing to do with insert/8's on-conflict handling -- so they're kept apart.

An Ecto.ParameterizedType for ClickHouse's FixedString(N) column type.