ConstraintViolationExceptionReason
Represents specific types of database constraint violations that can occur during query execution.
This enum categorizes standard constraint violation errors (such as unique, foreign key, or not-null violations) allowing the application to handle specific constraint errors programmatically without parsing SQL error codes manually.
Entries
A duplicate value was provided for a unique column or index (PostgreSQL 23505).
A value was provided that does not exist in the referenced table (PostgreSQL 23503).
A null value was provided for a non-nullable column (PostgreSQL 23502).
A value was provided that fails a CHECK constraint (PostgreSQL 23514).
Exclusion constraint violations (PostgreSQL 23P01).
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.