import { Kysely } from 'kysely'; import type { SchemaRegistry } from '../schema/registry.js'; export interface DatabaseClientConfig { host: string; port?: number; database: string; user: string; password: string; pool?: { min?: number; max?: number; }; } /** * Thin wrapper around Kysely that resolves qualified model names * (e.g. "sales.Invoice") to their underlying table names automatically. */ export declare class DatabaseClient { private readonly db; private readonly pool; private readonly qualifiedNameToTable; constructor(config: DatabaseClientConfig, registry?: SchemaRegistry); /** * Verify the database connection is reachable. * Throws with actionable diagnostics if it cannot connect. */ verifyConnection(): Promise; selectFrom(model: string): import("kysely").SelectQueryBuilder; insertInto(model: string): import("kysely").InsertQueryBuilder; updateTable(model: string): import("kysely").UpdateQueryBuilder; deleteFrom(model: string): import("kysely").DeleteQueryBuilder; /** Execute a callback within a database transaction. */ transaction(callback: (trx: Kysely) => Promise): Promise; /** Direct access to the underlying Kysely instance. */ get kysely(): Kysely; /** Close the connection pool and release resources. */ destroy(): Promise; /** Maps a qualified model name to its table name, falling back to the raw input. */ private resolveTable; /** Create the underlying pg connection pool. */ private createPool; /** Pre-compute the mapping from qualified model names to SQL table names. */ private buildTableNameMap; } //# sourceMappingURL=client.d.ts.map