Documentation ¶
Index ¶
- func CondCodeEq(code string) errors.MapCond
- func CondConstraintEq(c string) errors.MapCond
- func CondPQ() errors.MapCond
- func NewForeignKeyMapping(c string, t1 string, t2 string) errors.MapFunc
- func NewNotNullMapping(c string, t string, col string) errors.MapFunc
- func NewRestrictMapping(c string, t1 string, t2 string) errors.MapFunc
- func NewUniqueMapping(c string, t string, col string) errors.MapFunc
- func ToMapFunc(f func(context.Context, *pq.Error) (error, bool)) errors.MapFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CondCodeEq ¶
CondCodeEq function returns a condition function that matches a particular constraint code.
func CondConstraintEq ¶
CondConstraintEq function returns a condition function that matches a particular constraint name.
func NewForeignKeyMapping ¶
NewForeignKeyMapping function returns a mapping function that performs mapping of a constraint name (c) to specific foreign key message with user-friendly referencing (t1) and referenced (t2) table names provided.
func NewNotNullMapping ¶
NewNotNullMapping function returns a mapping function that performs mapping of a constraint name (c) to specific not-null violation error message with user-friendly table (t) name and column (col) name provided.
func NewRestrictMapping ¶
NewRestrictMapping function returns a mapping function that performs mapping of a constraint name (c) to specific restrict violation error message with user-friendly referencing (t1) and referenced (t2) table names provided.
func NewUniqueMapping ¶
NewUniqueMapping function returns a mapping function that performs mapping of a constraint name (c) to a specific unique violation error message with user-friendly table name (t) and column (col) name provided.
Types ¶
This section is empty.