Documentation
¶
Index ¶
- Variables
- func Constraint(op, table string, cause error) error
- func DuplicateKey(op, table string, cause error) error
- func IsConstraint(err error) bool
- func IsDuplicateKey(err error) bool
- func IsMissingIdentity(err error) bool
- func MissingIdentity(op, table string, columns []string, identityIndex int) error
- type Error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingIdentity indicates SQL generation/execution cannot proceed because // identity (primary key) columns were not detected. ErrMissingIdentity = errors.New("missing identity") // ErrDuplicateKey indicates an insert/update violated a unique constraint. // Note: many drivers return opaque error types; use IsDuplicateKey to detect. ErrDuplicateKey = errors.New("duplicate key") // ErrConstraint indicates a generic constraint violation (FK/CK/NOT NULL/etc). ErrConstraint = errors.New("constraint violation") )
Functions ¶
func Constraint ¶
func DuplicateKey ¶
func IsConstraint ¶
func IsDuplicateKey ¶
func IsMissingIdentity ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.