import type { ClickHouseClient } from "@clickhouse/client"; export interface LabelledStatement { readonly label: string; readonly query: string; } export declare function escapeSqlLiteral(value: string): string; /** * The idempotent create-or-rotate pair. `CREATE USER IF NOT EXISTS` is a * silent no-op for an existing user — it converges NEITHER the password NOR * any `SETTINGS` (ClickHouse 26.3, verified) — so the `ALTER USER` that * follows is what actually rotates the password and applies the settings. * Do not collapse to one statement. * * `settings`, when given, must be the COMPLETE settings list for the user: * `ALTER USER … SETTINGS` replaces the whole list rather than merging. */ export declare function buildEnsureUserStatements(name: string, password: string, settings?: string): readonly LabelledStatement[]; export interface EnsureUserWithPasswordOpts { /** Complete settings list — see `buildEnsureUserStatements`. */ settings?: string; /** Cancels the in-flight statement (worker shutdown), not just the next one. */ signal?: AbortSignal; } export declare function ensureUserWithPassword(client: ClickHouseClient, name: string, password: string, opts?: EnsureUserWithPasswordOpts): Promise;