import type { PGlite } from '@electric-sql/pglite'; import { type PgResultLike } from './runner'; /** * The minimal node-`pg` `Client` surface that `pgsql-client`'s `PgClient` uses: * `connect()`, `query()` and `end()`. A real `pg.Client` structurally satisfies * it, so registering a factory that returns this is transparent to consumers. */ export interface QueryablePgClient { connect(): Promise; query(text: any, values?: any[]): Promise; end(): Promise; } /** * Build a `pg.Client`-shaped object backed by an existing PGlite instance. * * Every client returned for the same instance shares that single in-process * session, so transaction control (`BEGIN`/`SAVEPOINT`/`ROLLBACK`/`COMMIT`) is * shared too. `end()` is a no-op: the instance lifecycle is owned by whoever * created it (see `registerPglite`), not by an individual client. */ export declare const createPgliteClient: (db: PGlite) => QueryablePgClient;