Builds ClickHouse SQL from an AshClickhouse.Query struct.
ClickHouse is a full SQL dialect, so most Ash query features map directly:
WHERE, ORDER BY, LIMIT, OFFSET, SELECT, DISTINCT, GROUP BY, and
aggregate functions are all natively supported.
Summary
Functions
Builds the final SELECT query and parameter list.
Builds a WHERE clause from a list of Ash filter expressions.
Quotes a ClickHouse identifier.
Returns the set of column names referenced by a list of filters.
Quotes a table name, optionally qualifying it with a database.
Functions
@spec build_optimized_query(AshClickhouse.Query.t()) :: {String.t(), list()}
Builds the final SELECT query and parameter list.
Builds a WHERE clause from a list of Ash filter expressions.
Returns {clause, params} where clause is either "" or
" WHERE <expr>".
Quotes a ClickHouse identifier.
Returns the set of column names referenced by a list of filters.
Quotes a table name, optionally qualifying it with a database.