IsDuplicationError checking if the sql error is not found.
(err error)
| 493 | |
| 494 | // IsDuplicationError checking if the sql error is not found. |
| 495 | func (d *Dalgorm) IsDuplicationError(err error) bool { |
| 496 | return strings.Contains(strings.ToLower(err.Error()), "duplicate") |
| 497 | } |
| 498 | |
| 499 | // IsCachedPlanError checks if the error is related to postgres cached query plan |
| 500 | // This error occurs occasionally in Postgres when reusing a cached query |