Documentation
¶
Overview ¶
Package postgres adapts PostgreSQL driver errors to GoForge ORM errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Classify ¶
Classify converts known PostgreSQL SQLSTATEs to driver-neutral ORM errors.
When err is a PersistenceError, the persistence error remains outermost and the classified error replaces its cause. The resulting chain is therefore:
PersistenceError -> ConstraintError/TransientError -> safeCause -> PgError
This preserves operation and table context together with errors.Is/errors.As access to the native error. safeCause prevents PostgreSQL messages and detail fields, which may contain submitted values, from reaching Error output. Context errors, unknown errors, and nil pass through unchanged.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.