/**
 * Database Adapter — infrastructure layer implementation of DbClient.
 *
 * Provides concrete adapters that bridge the domain's DbClient port
 * to database backends. Two implementations:
 *
 *   1. InMemoryDbAdapter  — zero-dependency, used for simulation/prototype
 *      demonstrations. Data lives in Maps; no persistence across restarts.
 *      This is the default for `agentics simulate` runs so enterprises can
 *      evaluate the solution without provisioning real infrastructure.
 *
 *   2. Production path (not included here) — the enterprise replaces this
 *      adapter with a real connection pool (SAP HANA, PostgreSQL, SQL Server)
 *      when moving from prototype to production. The DbClient interface
 *      remains identical, so domain code needs zero changes.
 *
 * Supports SAP HANA, PostgreSQL, and SQL Server dialects used by the
 * ERP database map. Passwords are always read from environment variables.
 *
 * To add sqlite for local persistence (optional):
 *   npm install sql.js   (WASM-based, no native compilation)
 *   Then implement DbClient.query/execute against sql.js API.
 */
import type { DbClient } from '../compliance/audit-trail.js';
import type { SQLDialect } from '../deps/erp-database-map.js';
export interface DbConnectionConfig {
    readonly host: string;
    readonly port: number;
    readonly database: string;
    readonly user: string;
    /** Read from environment — never hardcode. */
    readonly passwordEnvVar: string;
    readonly ssl: boolean;
    readonly maxConnections: number;
    readonly idleTimeoutMs: number;
    readonly dialect: SQLDialect;
}
/**
 * Build a DbConnectionConfig from environment variables.
 * Passwords are always resolved from env at runtime — never stored in config.
 */
export declare function buildDbConfigFromEnv(dialect: SQLDialect): DbConnectionConfig;
export interface InMemoryRow {
    [key: string]: unknown;
}
/**
 * In-memory implementation of DbClient for prototype demonstrations.
 * Stores rows in Maps keyed by table name, parsed from SQL statements.
 */
export declare class InMemoryDbAdapter implements DbClient {
    private readonly tables;
    getTable(name: string): InMemoryRow[];
    query(sql: string, params: unknown[]): Promise<unknown[]>;
    execute(sql: string, params: unknown[]): Promise<void>;
}
export type DbAdapterMode = 'in-memory' | 'sqlite' | 'production';
/**
 * Create a DbClient for the requested mode.
 *
 * - 'in-memory': Default for simulations. Zero dependencies, fast, ephemeral.
 * - 'sqlite':    For local persistence. Requires `sql.js` (WASM). Not yet
 *                implemented — falls back to in-memory with a warning.
 * - 'production': Reserved for enterprise deployment. Throws if called in
 *                 the prototype — enterprises implement this themselves.
 */
export declare function createDbAdapter(mode?: DbAdapterMode): DbClient;
//# sourceMappingURL=db-adapter.d.ts.map