import type { DatabaseSync } from 'node:sqlite'; import type { AsyncClient, DisposableAsyncClient, SqlfuProjectConfig } from '../types.js'; import type { SqlfuHost } from '../host.js'; /** * Open whatever `config.db` points to — a local sqlite file if it's a string, * a user-provided factory if it's a function, or sqlfu's project-local default * SQLite file when `db` is omitted. The factory is invoked on every call; users * memoize inside the factory if they want to share an expensive resource across * sqlfu commands. */ export declare function openConfigDb(config: SqlfuProjectConfig): Promise; /** * Open a local sqlite file and return a `DisposableAsyncClient` wrapping a * `node:sqlite` connection. The same primitive the string form of `config.db` * uses under the hood — exported so users can opt into the factory form while * keeping a local file. * * ```ts * defineConfig({ * db: () => openLocalSqliteFile('./app.sqlite'), * // ... * }); * ``` */ export declare function openLocalSqliteFile(dbPath: string): Promise; export declare function createNodeHost(): Promise; type NodeSqliteDatabase = InstanceType; export declare function createAsyncNodeSqliteClient(database: NodeSqliteDatabase): AsyncClient; export {};