import { C as Connection, U as UnexpectedErrorEvent, T as Trace, b as Driver, c as DriverStartOptions } from '../shared/hive.DlaRxYsk.js'; import { RowObject, RowValues, Transaction, TransactionResult, Statement } from '../sdk/transaction.js'; import { Logger } from '../sdk/logger.js'; import { ByteStream } from '../streams/index.js'; import 'zod'; //#region src/connection/index.d.ts declare class BunDatabaseConnection extends Connection { /** * Internal `Database` (from `bun:sqlite`) instance, facilitating * native SQLite functio bindings. */ private db; /** * If the binary contents are stored on disk, the path under which they * are stored. */ private readonly path; /** * Logger instance to use for logging. */ private logger; /** * Error handler to invoke with any errors which might occur during * background tasks. */ private onError; constructor(contents: Uint8Array | string, opts?: { logger?: Logger | null | undefined; onError?: ((event: UnexpectedErrorEvent) => void) | null | undefined; }); readonly getSize: () => Promise; readonly getContents: () => Promise; readonly query: = ReadonlyArray>(transaction: Transaction) => Promise>; /** * Close the `BunDatabaseConnection` instance. * * @returns Promise resolving when the `BunDatabaseConnection` instance has * been closed. */ readonly close: (_opts?: { trace?: Trace | null | undefined; }) => Promise; } //#endregion //#region src/index.d.ts type BunDriverConfig = { /** * List of Statements to provision a `Binding` instance with. Allows for * configuring SQLite with custom settings. * * @default `SENSIBLE_DEFAULTS` */ provision?: Array | null | undefined; }; declare class BunDriver extends Driver { static readonly name = "bun-driver"; /** * `Logger` instance to use for logging. */ private logger; /** * Error handler to invoke with any errors which might occur during * background tasks. */ private onError; /** * List of Statements to provision a `Connection` with after opening it. * * Allows for applying custom SQLite default settings like WAL mode or a * custom page size. */ private readonly provision; constructor(config?: BunDriverConfig); readonly start: (opts?: DriverStartOptions & { trace?: Trace | null | undefined; }) => Promise; readonly stop: (opts?: { trace?: Trace | null | undefined; }) => Promise; readonly open: (contents: Uint8Array | ":memory:" | string, opts?: { trace?: Trace | null | undefined; }) => Promise; } export { BunDatabaseConnection, BunDriver };