We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a60d4f commit cf6cd11Copy full SHA for cf6cd11
error_translator.go
@@ -6,10 +6,11 @@ import (
6
"gorm.io/gorm"
7
)
8
9
+// The error codes to map sqlite errors to gorm errors, here is a reference about error codes for sqlite https://www.sqlite.org/rescode.html.
10
var errCodes = map[int]error{
11
1555: gorm.ErrDuplicatedKey,
12
2067: gorm.ErrDuplicatedKey,
- 768: gorm.ErrForeignKeyViolated,
13
+ 787: gorm.ErrForeignKeyViolated,
14
}
15
16
type ErrMessage struct {
0 commit comments