(err error)
| 48 | } |
| 49 | |
| 50 | func (postgresHelper) IsDuplicateKeyError(err error) bool { |
| 51 | switch dbErr := err.(type) { |
| 52 | case *pq.Error: |
| 53 | if dbErr.Code == "23505" { |
| 54 | return true |
| 55 | } |
| 56 | } |
| 57 | return false |
| 58 | } |
| 59 | |
| 60 | func init() { |
| 61 | dbhelper.Register(postgresHelper(0)) |
nothing calls this directly
no outgoing calls
no test coverage detected