/** * int8 → number coercion replicating postgres-meta's global int8 type parser. * * postgres-meta installs `pg.types.setTypeParser(INT8, ...)` in * `src/lib/db.ts`, so every `bigint`/`int8` column comes back as a JS number * when it fits in a safe integer, and as the raw string otherwise. Stock `pg` * (and other drivers) instead return int8 as a string. To keep * `GeneratorMetadata` byte-identical regardless of driver, we re-apply that * exact coercion to the known int8 top-level fields after each query. * * Only top-level int8 columns need this: int8 values embedded inside `jsonb` * columns (e.g. `args[].type_id`, composite type attributes) * are decoded by the JSON parser as numbers in every driver, matching * postgres-meta. Composite text ids like a column's `"."` are not * safe integers, so the `Number.isSafeInteger` guard leaves them untouched — * exactly as postgres-meta's parser does, since that column is `text`, not * int8. */ /** * Coerce a single value the way postgres-meta's `setTypeParser(INT8, ...)` * does: parse to a number when it is a safe integer, otherwise keep the raw * string. Non-string values (already-numbers, `null`) pass through unchanged. */ export declare function coerceInt8Value(value: unknown): unknown; /** * Apply {@link coerceInt8Value} to the known int8 fields of a single row, * mutating and returning it. */ export declare function normalizeRow>(row: T): T; /** Apply {@link normalizeRow} to every row of a query result. */ export declare function normalizeRows>(rows: T[]): T[];