Source File
errors.go
Belonging Package
gorm.io/gorm
package gormimport ()var (// ErrRecordNotFound record not found errorErrRecordNotFound = logger.ErrRecordNotFound// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`ErrInvalidTransaction = errors.New("invalid transaction")// ErrNotImplemented not implementedErrNotImplemented = errors.New("not implemented")// ErrMissingWhereClause missing where clauseErrMissingWhereClause = errors.New("WHERE conditions required")// ErrUnsupportedRelation unsupported relationsErrUnsupportedRelation = errors.New("unsupported relations")// ErrPrimaryKeyRequired primary keys requiredErrPrimaryKeyRequired = errors.New("primary key required")// ErrModelValueRequired model value requiredErrModelValueRequired = errors.New("model value required")// ErrModelAccessibleFieldsRequired model accessible fields requiredErrModelAccessibleFieldsRequired = errors.New("model accessible fields required")// ErrSubQueryRequired sub query requiredErrSubQueryRequired = errors.New("sub query required")// ErrInvalidData unsupported dataErrInvalidData = errors.New("unsupported data")// ErrUnsupportedDriver unsupported driverErrUnsupportedDriver = errors.New("unsupported driver")// ErrRegistered registeredErrRegistered = errors.New("registered")// ErrInvalidField invalid fieldErrInvalidField = errors.New("invalid field")// ErrEmptySlice empty slice foundErrEmptySlice = errors.New("empty slice found")// ErrDryRunModeUnsupported dry run mode unsupportedErrDryRunModeUnsupported = errors.New("dry run mode unsupported")// ErrInvalidDB invalid dbErrInvalidDB = errors.New("invalid db")// ErrInvalidValue invalid valueErrInvalidValue = errors.New("invalid value, should be pointer to struct or slice")// ErrInvalidValueOfLength invalid values do not match lengthErrInvalidValueOfLength = errors.New("invalid association values, length doesn't match")// ErrPreloadNotAllowed preload is not allowed when count is usedErrPreloadNotAllowed = errors.New("preload is not allowed when count is used")// ErrDuplicatedKey occurs when there is a unique key constraint violationErrDuplicatedKey = errors.New("duplicated key not allowed")// ErrForeignKeyViolated occurs when there is a foreign key constraint violationErrForeignKeyViolated = errors.New("violates foreign key constraint"))
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |