@close-by/clay-clickhouse
v0.2.16
Published
Multi-connection ClickHouse client helpers for Clay apps
Downloads
2,917
Readme
@close-by/clay-clickhouse
Multi-connection ClickHouse helpers for Clay apps (same shape as @close-by/clay-duckdb).
bun add @close-by/clay-clickhouseimport { ClickHouse } from '@close-by/clay-clickhouse';
const ch = new ClickHouse();
await ch.connect('analytics', {
url: process.env.CLICKHOUSE_URL ?? 'http://localhost:8123',
username: 'default',
password: '',
database: 'analytics',
});
const rows = await ch.db('analytics').query('SELECT 1 AS n');Full API: docs/clickhouse.md in the Clay repo.
Note: Prefer running Clay with the reactive-let Bun loader off (--no-reactive-let, or avoid // @clay-reactive / "use reactive" on ClickHouse pages) when depending on @clickhouse/client, so CJS named-export interop stays reliable. Auto-register only kicks in when pages opt into the pragma.
