UNPKG

@pgxsinkit/pgwasm

Version:
8 lines • 544 B
import type { Pgwasm, Transaction } from "../interface"; /** * Inline a query's parameters as SQL literals (Postgres' own `format(%L)`), for statements that cannot * take parameters (a `CREATE VIEW`). The tables the query references must exist, since the parameter * types come from describing it. `tx` runs the final `format()` inside a transaction. */ export declare function formatQuery(pg: Pgwasm, query: string, params?: readonly unknown[] | null, tx?: Transaction | Pgwasm): Promise<string>; //# sourceMappingURL=format-query.d.ts.map