MCPcopy Create free account
hub / github.com/apache/devlake / IsDuplicationError

Method IsDuplicationError

backend/impls/dalgorm/dalgorm.go:495–497  ·  view source on GitHub ↗

IsDuplicationError checking if the sql error is not found.

(err error)

Source from the content-addressed store, hash-verified

493
494// IsDuplicationError checking if the sql error is not found.
495func (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

Callers 1

convertGormErrorMethod · 0.95

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected