import type { WarehouseQueryResult, WarehouseTransactionFn } from './types.js'; /** * Contract implemented by every primary warehouse adapter. * * Adapters power operational workloads (transactions, point queries, etc.). * The interface intentionally mirrors a typical SQL client without enforcing * a specific library (Kysely, pg, etc.). */ export interface IWarehouseAdapter { /** Human friendly provider name for logging / diagnostics. */ readonly name: string; /** Execute a raw SQL statement and return its rows. */ query( sql: string, params?: readonly unknown[], ): Promise; /** Execute a callback inside a transaction. */ transaction(fn: WarehouseTransactionFn): Promise; /** Flush buffers or pending work (optional for most adapters). */ flush(): Promise; /** Release external resources. */ close(): Promise; }