-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
20 lines (18 loc) · 977 Bytes
/
errors.go
File metadata and controls
20 lines (18 loc) · 977 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package dbx
import "errors"
var (
// ErrEmptyColumns indicates that columns map is empty for INSERT/UPDATE.
ErrEmptyColumns = errors.New("cols cannot be empty")
// ErrEmptyRows indicates rows slice is empty for batch insert.
ErrEmptyRows = errors.New("rows cannot be empty")
// ErrInconsistentColumns indicates batch rows use different column sets.
ErrInconsistentColumns = errors.New("rows must have identical column keys")
// ErrInvalidModel indicates model must be pointer to struct.
ErrInvalidModel = errors.New("model must be a non-nil pointer to struct")
// MissingPKError indicates no primary key fields are declared.
MissingPKError = errors.New("missing primary key declaration")
// CompositePKError indicates composite primary keys are not supported.
CompositePKError = errors.New("composite primary key is not supported")
// ErrInvalidSavepointName indicates savepoint name is invalid.
ErrInvalidSavepointName = errors.New("invalid savepoint name")
)