Ecto.Adapters.ClickHouse.Naming (clickhouse_adapter_ecto v0.1.0)

Copy Markdown

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.

quote_name/1 and quote_table/2 are exposed (rather than kept defp) so Ecto.Adapters.ClickHouse.DDL's DDL generation, Ecto.Adapters.ClickHouse.QueryBuilder, and Ecto.Adapters.ClickHouse.Expression can all reuse the exact same identifier-quoting logic, instead of duplicating it.