/** * Patches all PgArray columns on the given tables to handle NULL values safely. * * Drizzle ORM's `PgArray.mapFromDriverValue` calls `value.map(...)` without * guarding against `null`. When a PostgreSQL native array column (`text[]`, * `integer[]`, etc.) contains NULL, the pg driver returns `null` in JavaScript, * and `null.map(...)` throws `TypeError: value.map is not a function`. * * This function walks every column of every registered table and, for any * `PgArray` column, wraps its `mapFromDriverValue` to return `null` when the * database value is nullish. * * This is a workaround for a known Drizzle ORM issue. Should be removed once * Drizzle handles nullable arrays natively. */ export declare function patchPgArrayNullSafety(tables: Record): void;