IsConstraintError returns a boolean indicating whether the error is a constraint failure.
(err error)
| 316 | |
| 317 | // IsConstraintError returns a boolean indicating whether the error is a constraint failure. |
| 318 | func IsConstraintError(err error) bool { |
| 319 | if err == nil { |
| 320 | return false |
| 321 | } |
| 322 | var e *ConstraintError |
| 323 | return errors.As(err, &e) |
| 324 | } |
| 325 | |
| 326 | // selector embedded by the different Select/GroupBy builders. |
| 327 | type selector struct { |
no outgoing calls
no test coverage detected