A lightweight, TypeScript-based SQL query builder for ClickHouse. Version 1.0.5 provides a fluent API to construct SELECT, INSERT, UPDATE, and DELETE queries with ClickHouse-specific features like PREWHERE, LIMIT BY, and raw expressions. It simplifies generating complex SQL strings without runtime dependencies, supporting subqueries, aggregations, and clickhouse-specific functions. Ideal for Node.js applications needing a type-safe query builder with full ClickHouse dialect support. Maintained on GitHub with sparse updates.
npm install clickhouse-sql-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Builds a SELECT query with aggregation, filtering, grouping, ordering, and limit using the query builder pattern.
Use b.raw("date = toDateTime('2021-01-01')") instead of b.and('date', '=', 'toDateTime(...)')Ensure the string is safe; consider using limit(5) without BY for simple cases.
Check source code or tests for other query types, or use raw SQL for mutations.
Use import { ClickhouseQueryBuilder } from 'clickhouse-sql-client'Run npm install clickhouse-sql-client
Chain .sql() at the end of the builder call.
No dependency data recorded yet.