TypeScript 97.6%
SQL 1.4%
JavaScript 0.5%
1/** Extract the PostgreSQL error code from a raw pg error or a drizzle-wrapped one. */2export function pgCode(e: unknown): string | undefined {3 const err = e as { code?: string; cause?: { code?: string } } | undefined;4 return err?.code ?? err?.cause?.code;5}67export const PG_UNIQUE_VIOLATION = "23505";8