import type { BunMariaDBConfig, DBResponseObject } from "../types"; /** Anything that can run a raw query: a client or a transaction handle */ export type DBQueryRunner = { unsafe: (query: string, values?: any[]) => Promise; }; type Param = { query: string; values?: any[]; config?: BunMariaDBConfig; /** Run on this client / transaction instead of the shared client */ client?: DBQueryRunner; }; /** * Resolve a shared MariaDB client. Prefer the global client so schema sync * and CRUD do not open a new connection per query. */ export declare function resolveClient(config?: BunMariaDBConfig): Bun.SQL | undefined; /** * Keep the event loop alive until `fn` settles. * An idle Bun.SQL connection does not hold the process open, so a query sent * on it after something else released the loop (e.g. an inquirer prompt * releasing stdin) lets Bun exit silently mid-query. */ export declare function holdEventLoop(fn: () => Promise): Promise; /** * # Main DB Handler Function */ export default function dbHandler({ query, values, config, client }: Param): Promise>; export {};