IsConstraintError returns a boolean indicating whether the error is a constraint failure.
(err error)
| 298 | |
| 299 | // IsConstraintError returns a boolean indicating whether the error is a constraint failure. |
| 300 | func IsConstraintError(err error) bool { |
| 301 | if err == nil { |
| 302 | return false |
| 303 | } |
| 304 | var e *ConstraintError |
| 305 | return errors.As(err, &e) |
| 306 | } |
| 307 | |
| 308 | // selector embedded by the different Select/GroupBy builders. |
| 309 | type selector struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…