/** * Minimal inline port of the `pg-format` helpers this package uses, so the * package carries no runtime dependency for them (the CommonJS-only * `pg-format` package is awkward to consume from ESM/bundled CLIs). * * Mirrors `pg-format@1.0.4` byte-for-byte for the inputs postgres-meta feeds * it — in particular numbers are quoted (`literal(10)` is `'10'`), because * that is what postgres-meta's SQL emits and this package is byte-parity * constrained against it. The `supabase/supabase` `packages/pg-meta` port * deliberately diverges here (unquoted numbers); do not "fix" this to match it. * * Originally ported from PostgreSQL's `src/interfaces/libpq/fe-exec.c`. */ /** * Quote a value as a SQL literal. `null`/`undefined` become `NULL`, booleans * `'t'`/`'f'`, dates ISO 8601 strings, arrays comma-separated lists (nested * arrays become parenthesised groups), plain objects `'…'::jsonb`, and * everything else — including numbers — a single-quoted string with embedded * quotes doubled. Strings containing a backslash use the `E'…'` form. */ export declare function literal(value?: unknown): string;