forked from mirror/gorm
33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
package gorm
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
var (
|
|
// ErrRecordNotFound record not found error
|
|
ErrRecordNotFound = errors.New("record not found")
|
|
// ErrInvalidSQL invalid SQL error, happens when you passed invalid SQL
|
|
ErrInvalidSQL = errors.New("invalid SQL")
|
|
// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`
|
|
ErrInvalidTransaction = errors.New("no valid transaction")
|
|
// ErrUnaddressable unaddressable value
|
|
ErrUnaddressable = errors.New("using unaddressable value")
|
|
// ErrNotImplemented not implemented
|
|
ErrNotImplemented = errors.New("not implemented")
|
|
// ErrMissingWhereClause missing where clause
|
|
ErrMissingWhereClause = errors.New("WHERE conditions required")
|
|
// ErrUnsupportedRelation unsupported relations
|
|
ErrUnsupportedRelation = errors.New("unsupported relations")
|
|
// ErrPtrStructSupported only ptr of struct supported
|
|
ErrPtrStructSupported = errors.New("only ptr of struct supported")
|
|
// ErrorPrimaryKeyRequired primary keys required
|
|
ErrorPrimaryKeyRequired = errors.New("primary key required")
|
|
// ErrorModelValueRequired model value required
|
|
ErrorModelValueRequired = errors.New("model value required")
|
|
// ErrUnsupportedDriver unsupported driver
|
|
ErrUnsupportedDriver = errors.New("unsupported driver")
|
|
// ErrRegistered registered
|
|
ErrRegistered = errors.New("registered")
|
|
)
|