2020-01-30 10:14:48 +03:00
|
|
|
package gorm
|
|
|
|
|
2020-01-31 01:35:25 +03:00
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
2020-01-30 10:14:48 +03:00
|
|
|
|
|
|
|
var (
|
|
|
|
// ErrRecordNotFound record not found error
|
|
|
|
ErrRecordNotFound = errors.New("record not found")
|
|
|
|
// ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback`
|
|
|
|
ErrInvalidTransaction = errors.New("no valid transaction")
|
2020-02-20 18:04:03 +03:00
|
|
|
// ErrNotImplemented not implemented
|
|
|
|
ErrNotImplemented = errors.New("not implemented")
|
2020-03-08 09:51:52 +03:00
|
|
|
// ErrMissingWhereClause missing where clause
|
2020-05-31 18:55:56 +03:00
|
|
|
ErrMissingWhereClause = errors.New("WHERE conditions required")
|
2020-05-07 05:03:48 +03:00
|
|
|
// ErrUnsupportedRelation unsupported relations
|
|
|
|
ErrUnsupportedRelation = errors.New("unsupported relations")
|
2020-07-26 05:03:58 +03:00
|
|
|
// ErrPrimaryKeyRequired primary keys required
|
|
|
|
ErrPrimaryKeyRequired = errors.New("primary key required")
|
|
|
|
// ErrModelValueRequired model value required
|
|
|
|
ErrModelValueRequired = errors.New("model value required")
|
2020-08-18 13:00:36 +03:00
|
|
|
// ErrInvalidData unsupported data
|
|
|
|
ErrInvalidData = errors.New("unsupported data")
|
2020-06-19 13:30:04 +03:00
|
|
|
// ErrUnsupportedDriver unsupported driver
|
|
|
|
ErrUnsupportedDriver = errors.New("unsupported driver")
|
2020-06-23 04:38:51 +03:00
|
|
|
// ErrRegistered registered
|
|
|
|
ErrRegistered = errors.New("registered")
|
2020-06-30 11:53:54 +03:00
|
|
|
// ErrInvalidField invalid field
|
|
|
|
ErrInvalidField = errors.New("invalid field")
|
2020-09-03 06:32:30 +03:00
|
|
|
// ErrEmptySlice empty slice found
|
|
|
|
ErrEmptySlice = errors.New("empty slice found")
|
2020-01-30 10:14:48 +03:00
|
|
|
)
|