import type { PGlite } from '@electric-sql/pglite'; /** * A node-`pg`-shaped result. pgpm / pgsql-client read `rows` and (occasionally) * `rowCount`, so we normalize PGlite's `{ rows, affectedRows, fields }` onto that * shape. */ export interface PgResultLike { rows: any[]; rowCount: number; fields: any[]; } /** * Run a statement against the single in-process PGlite engine. * * PGlite mirrors node-`pg`'s two protocols: * - parameterized (`$1`, ...) -> `db.query` (extended protocol, single statement) * - no parameters -> `db.exec` (simple protocol, supports the multi-statement * bootstrap SQL pgpm runs in `initialize()`), returning the last result. */ export declare const run: (db: PGlite, text: string, values?: any[]) => Promise; /** Normalize the two call shapes pg accepts: `(text, values)` or `({ text, values })`. */ export declare const normalize: (first: any, second?: any[]) => { text: string; values?: any[]; }; /** A bound `(text, values | { text, values })` query function over a PGlite instance. */ export declare const boundQuery: (db: PGlite) => (text: any, values?: any[]) => Promise;