Files
bun.sh/test/js/sql
Claude Bot c478f6deee Add comprehensive PostgreSQL error condition names and detail parsing
- Add comprehensive mapping of PostgreSQL error codes to condition names using StaticStringMap
- Add 'condition' field to PostgresError with human-readable condition names
- Add parsed detail fields for 4 major PostgreSQL error types:
  * Unique violations (23505): key, value
  * Foreign key violations (23503): key, value, referenced_table
  * Not null violations (23502): failing_column
  * Check violations (23514): check_constraint, failing_table
- Support all standard PostgreSQL error codes from documentation (200+ codes)
- Use efficient StaticStringMap for O(1) error code lookups
- Replace magic numbers with named constants for better maintainability
- Remove unit tests that didn't test actual functionality (as requested by reviewers)
- Add comprehensive integration tests for all supported error types
- Extend parsing beyond just unique constraints to cover major error categories
- Add edge case handling and comprehensive test coverage

This addresses all review feedback:
 "Remove this test" / "useless tests" - Deleted non-functional unit tests
 "are there other error codes we can attach info for?" - Extended to 4 error types with structured parsing
 "feels incomplete currently" - Now comprehensive with extensible architecture

The implementation now provides structured error detail parsing for the major PostgreSQL
error categories with proper test coverage and extensible design for future error types.

Performance: O(1) error code lookups, compile-time map generation, zero runtime overhead

Fixes #21698

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-14 22:48:25 +00:00
..
2025-05-08 18:51:32 -07:00
2025-05-08 18:51:32 -07:00
2025-08-01 22:41:05 -07:00
2025-08-14 12:25:16 -07:00