(err error)
| 8 | ) |
| 9 | |
| 10 | func IsSerializedError(err error) bool { |
| 11 | var pqErr *pq.Error |
| 12 | if errors.As(err, &pqErr) { |
| 13 | return pqErr.Code.Name() == "serialization_failure" |
| 14 | } |
| 15 | return false |
| 16 | } |
| 17 | |
| 18 | // IsUniqueViolation checks if the error is due to a unique violation. |
| 19 | // If one or more specific unique constraints are given as arguments, |
no test coverage detected