2024-09-12 17:22:42 -04:00
|
|
|
package orm
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
ErrNotASlice = errors.New("Current object or field is not a slice!")
|
|
|
|
ErrNotAStruct = errors.New("Current object or field is not a struct!")
|
|
|
|
ErrOutOfBounds = errors.New("Index(es) out of bounds!")
|
|
|
|
ErrAppendMultipleDocuments = errors.New("Cannot append to multiple documents!")
|
|
|
|
ErrNotSliceOrStruct = errors.New("Current object or field is not a slice nor a struct!")
|
2024-09-14 15:20:17 -04:00
|
|
|
ErrUnsupportedID = errors.New("Unknown or unsupported id type provided")
|
2024-09-12 17:22:42 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
errFmtMalformedField = "Malformed field name passed: '%s'"
|
|
|
|
errFmtNotAModel = "Type '%s' is not a model"
|
|
|
|
errFmtNotHasID = "Type '%s' does not implement HasID"
|
|
|
|
errFmtModelNotRegistered = "Model not registered for type: '%s'"
|
|
|
|
)
|