Documentation
¶
Overview ¶
Package dberr classifies driver-specific database errors into a small set of dialect-neutral sentinel errors that callers can match with errors.Is, without importing pgconn or the sqlite driver themselves.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUniqueViolation = errors.New("drel: unique constraint violation") ErrForeignKeyViolation = errors.New("drel: foreign key constraint violation") ErrNotNullViolation = errors.New("drel: not-null constraint violation") ErrCheckViolation = errors.New("drel: check constraint violation") ErrSerializationFailure = errors.New("drel: serialization failure (retry the transaction)") )
Sentinel errors for common, actionable database conditions. They are matched with errors.Is; the original driver error remains available via errors.As / Unwrap.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.