/**
 * Runtime-agnostic SQLite shim.
 *
 * Uses `bun:sqlite` when running under Bun, `better-sqlite3` under Node.js.
 * Both expose the same subset we need (.exec, .prepare, .close) so the rest
 * of the gateway code never needs to know which engine is active.
 *
 * Drizzle ORM has matching adapters for both backends; `createDrizzle()`
 * returns the correct one.
 */
import * as schema from "./schema.js";
export interface SqliteStatement {
    all(...params: unknown[]): unknown[];
    run(...params: unknown[]): unknown;
    get(...params: unknown[]): unknown;
}
export interface SqliteDatabase {
    exec(sql: string): void;
    prepare(sql: string): SqliteStatement;
    close(): void;
}
/**
 * Open a raw SQLite database using whichever native driver is available.
 * The returned handle satisfies `SqliteDatabase` in both runtimes.
 */
export declare function openRawSqlite(path: string): Promise<SqliteDatabase>;
type SchemaType = typeof schema;
/**
 * Wrap a raw SQLite handle with the matching Drizzle ORM adapter.
 * Returns a fully-typed Drizzle instance regardless of runtime.
 */
export declare function createDrizzle(rawDb: SqliteDatabase): Promise<DrizzleDB>;
import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3";
export type DrizzleDB = BetterSQLite3Database<SchemaType>;
export {};
//# sourceMappingURL=sqlite-shim.d.ts.map