import { type DbExec } from "./client.js"; export declare function invalidateSchemaSnapshot(injectedClient?: DbExec): void; export declare function __resetSchemaSnapshotForTests(): void; export declare function pgTableExists(table: string, injectedClient?: DbExec): Promise; export declare function pgColumnExists(table: string, column: string, injectedClient?: DbExec): Promise; export declare function pgIndexExists(indexName: string, injectedClient?: DbExec): Promise; export declare function ensureSchemaObject(options: { probe: () => Promise; ddl: string; label: string; lockTimeout?: string; timeoutMs?: number; injectedClient?: DbExec; }): Promise; export declare function ensureTableExists(table: string, createSql: string, options?: { lockTimeout?: string; injectedClient?: DbExec; }): Promise; export declare function ensureColumnExists(table: string, column: string, addColumnSql: string, options?: { lockTimeout?: string; injectedClient?: DbExec; }): Promise; export declare function ensureIndexExists(indexName: string, createIndexSql: string, options?: { lockTimeout?: string; timeoutMs?: number; injectedClient?: DbExec; }): Promise; /** * Ensure an additive Postgres index with `CREATE INDEX CONCURRENTLY`. * * This is deliberately separate from `ensureIndexExists`: the normal helper * wraps DDL in a transaction so it can scope `lock_timeout`, but PostgreSQL * forbids `CREATE INDEX CONCURRENTLY` inside a transaction. The caller must * supply the concurrent form of the statement; direct execution keeps the * build outside a transaction and avoids blocking writes on a large table. */ export declare function ensureIndexExistsConcurrently(indexName: string, createIndexSql: string, options?: { injectedClient?: DbExec; }): Promise; export declare function isLockTimeoutError(err: unknown): boolean; export declare function runGuardedDdl(ddl: string, options?: { lockTimeout?: string; idleInTransactionTimeout?: string; /** Per-statement budget for the DDL itself, in place of the default. */ timeoutMs?: number; injectedClient?: DbExec; }): Promise;