Documentation
¶
Overview ¶
Package dberr classifies the database errors the CMS reacts to, across every supported engine.
It replaces the Postgres-only internal/pgutil. Each function checks both engines' error types, so call sites need no dialect of their own — an error can only have come from the driver that is actually in use.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsForeignKeyViolation ¶
IsForeignKeyViolation reports whether err is a foreign-key violation — Postgres SQLSTATE 23503, MySQL errors 1451/1452 (and the older 1216/1217) — e.g. referencing a deleted page.
func IsUniqueViolation ¶
IsUniqueViolation reports whether err is a unique-constraint violation — Postgres SQLSTATE 23505, MySQL error 1062.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.