gorm/errors.go

29 lines
1.1 KiB
Go
Raw Normal View History

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")
// 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")
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-05-24 15:44:37 +03:00
// ErrPtrStructSupported only ptr of struct supported
ErrPtrStructSupported = errors.New("only ptr of struct supported")
2020-05-25 19:16:41 +03:00
// ErrorPrimaryKeyRequired primary keys required
ErrorPrimaryKeyRequired = errors.New("primary key required")
2020-06-05 14:19:08 +03:00
// ErrorModelValueRequired model value required
ErrorModelValueRequired = errors.New("model value required")
2020-01-30 10:14:48 +03:00
)