Repository navigation
Expand file tree
/
Copy patherror.go
More file actions
80 lines (77 loc) · 4.13 KB
/
Copy patherror.go
File metadata and controls
80 lines (77 loc) · 4.13 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package dbmeta
// Error is an error.
type Error string
// Error satisfies the error interface.
func (err Error) Error() string {
return string(err)
}
// Error values.
const (
// ErrNotSupported is the not supported error. The model exists and the
// database cannot answer for that object.
ErrNotSupported Error = "not supported"
// ErrCopyFromStdinNotAlone is the copy from stdin not alone error. The
// text holds a COPY that reads its rows from the client and another
// statement, so the rows cannot follow the COPY. See [Dialect.CopyFromStdin].
ErrCopyFromStdinNotAlone Error = "copy from stdin is not the only statement"
// ErrModelNotBuilt is the model not built error. The model was left out of
// this binary by a build tag. It says nothing about what the database can
// do.
ErrModelNotBuilt Error = "model not built"
// ErrNotFound is the not found error. The database has no object of that
// name. An empty result means the same thing and is not an error.
ErrNotFound Error = "not found"
// ErrPermissionDenied is the permission denied error. The connected user
// cannot read that part of the catalog.
ErrPermissionDenied Error = "permission denied"
// ErrVersionTooOld is the version too old error. The server is older than
// the oldest version the model supports.
ErrVersionTooOld Error = "version too old"
// ErrInvalidVersion is the invalid version error.
ErrInvalidVersion Error = "invalid version"
// ErrInvalidSuperuser is the invalid superuser error. The column that
// the superuser query returned is not a boolean in a form that
// [Dialect.ParseSuperuser] knows.
ErrInvalidSuperuser Error = "invalid superuser"
// ErrEmptyQuery is the empty query error. A statement resolved to no SQL.
ErrEmptyQuery Error = "empty query"
// ErrUnknownParam is the unknown parameter error. An argument was given a
// name the statement does not take. It is never ignored, because ignoring
// it turns a typo into a query that silently drops a filter.
ErrUnknownParam Error = "unknown parameter"
// ErrMissingParam is the missing parameter error. The statement names a
// parameter that the arguments do not supply.
ErrMissingParam Error = "missing parameter"
// ErrSeveralStatements is the several statements error. The query is
// answered with more than one statement, which Query.All runs, so Build
// has no one statement to return. See D146.
ErrSeveralStatements Error = "answered with several statements"
// ErrInvalidParam is the invalid parameter error. A value cannot be
// rendered into a statement by a dialect that has no way to bind one.
// Only Apache Hive can return it, because only Hive renders literals,
// and it returns one rather than guessing at a value it cannot escape
// safely. See [Info.Literal] and D78.
ErrInvalidParam Error = "invalid parameter"
// ErrQuotingUnknown is the quoting unknown error. Building a statement
// that carries a password needs session state the caller did not read,
// and guessing it can let the password escape its own literal. See D56.
ErrQuotingUnknown Error = "quoting unknown"
// ErrInvalidPassword is the invalid password error. A password or a user
// name holds a character the product cannot carry in the statement: a NUL
// on every product, and a double quote on Oracle, which takes both
// between double quotes and has no escape for one.
ErrInvalidPassword Error = "invalid password"
// ErrInvalidString is the invalid string error. A value holds a character
// that the product cannot carry in a literal or in a quoted name: a NUL on
// every product, and a double quote in a name on Oracle, which has no
// escape for one.
ErrInvalidString Error = "invalid string"
// ErrInvalidIdentifier is the invalid identifier error. A qualified name has
// a quote that is never closed, text after a quoted part, or no text at all.
ErrInvalidIdentifier Error = "invalid identifier"
// ErrAmbiguousFragment is the ambiguous fragment error. Two alternatives
// of one choice name different versions and the server reports both, so
// nothing decides between them. It is a fault in the model, not in the
// database or the call. See D44.
ErrAmbiguousFragment Error = "ambiguous fragment"
)