import { type BatchResult, type DatabaseDriver, type MigrationRunner, type PreparedStatement } from "@aotter/mantle-runtime"; /** * `DatabaseDriver` impl wrapping Cloudflare's `D1Database` binding. * * The runtime port shape is intentionally close to D1's API (which is * itself close to the SQLite C API), so this wrapper is mostly a * type-narrowing pass-through. The shared SQLite runner records applied * migrations so subsequent boots are idempotent. * * Per ADR-0011 the runtime never imports `D1Database` itself — this * file is the only place in the codebase that does. */ export declare class D1DatabaseDriver implements DatabaseDriver { private readonly db; private readonly observe?; readonly migrations: MigrationRunner; constructor(db: D1Database, observe?: D1QueryObserver | undefined); prepare(sql: string): PreparedStatement; batch(stmts: ReadonlyArray): Promise; } export interface D1QueryMetric { readonly sql: string; readonly durationMs: number; readonly rowsRead: number; readonly rowsWritten: number; } export type D1QueryObserver = (metric: D1QueryMetric) => void; //# sourceMappingURL=D1DatabaseDriver.d.ts.map