/
Errors.go
43 lines (29 loc) · 1.72 KB
/
Errors.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package godbhelper
import "errors"
var (
//ErrDBNotSupported error if database is not supported
ErrDBNotSupported = errors.New("Database not supported")
//ErrPostgresURIMissingArg error if Open() mysqlDB and missing an arg
ErrPostgresURIMissingArg = errors.New("Postgres missing argument. Use Open(username, password, address, port, database)")
//ErrMysqlURIMissingArg error if Open() mysqlDB and missing an arg
ErrMysqlURIMissingArg = errors.New("MYSQL missing argument. Use Open(username, password, address, port, database)")
//ErrPortInvalid if given port is invalid
ErrPortInvalid = errors.New("Port invalid. Port must be <= 65535 and > 0")
//ErrSqliteEncryptMissingArg error if Open() SqliteEncrypt and missing argument
ErrSqliteEncryptMissingArg = errors.New("SqliteEncrypt missing argument. Use Open(file, key)")
//ErrSqliteMissingArg error if Open() Sqlite and missing argument
ErrSqliteMissingArg = errors.New("Sqlite missing argument. Use Open(file)")
//ErrVersionStoreTooManyVersions if VersionStore contains more than one version
ErrVersionStoreTooManyVersions = errors.New("Too many versions stored in VersionStore")
//ErrCantStoreVersionInDB err if running update and StoreVersionInDB=false
ErrCantStoreVersionInDB = errors.New("Can't store Version in Database. Set StoreVersionInDB=true")
//ErrInvalidDatabase an invalid dbsys was used
ErrInvalidDatabase = errors.New("Invalid database")
//QueryBuilder errors
//ErrNoStruct if the given data is no struct
ErrNoStruct = errors.New("Data must be a struct")
//ErrNoRowsInResultSet error if no rows in resultSet
ErrNoRowsInResultSet = "sql: no rows in result set"
//ErrCantAddress if input is no pointer
ErrCantAddress = errors.New("Can't address value")
)