@@ -6,6 +6,23 @@ import (
6
6
"gopkg.in/src-d/go-errors.v1"
7
7
)
8
8
9
+ var (
10
+ // ErrInvalidType is thrown when there is an unexpected type at some part of
11
+ // the execution tree.
12
+ ErrInvalidType = errors .NewKind ("invalid type: %s" )
13
+
14
+ // ErrTableAlreadyExists is thrown when someone tries to create a
15
+ // table with a name of an existing one
16
+ ErrTableAlreadyExists = errors .NewKind ("table with name %s already exists" )
17
+
18
+ // ErrTableNotFound is returned when the table is not available from the
19
+ // current scope.
20
+ ErrTableNotFound = errors .NewKind ("table not found: %s" )
21
+
22
+ //ErrUnexpectedRowLength is thrown when the obtained row has more columns than the schema
23
+ ErrUnexpectedRowLength = errors .NewKind ("expected %d values, got %d" )
24
+ )
25
+
9
26
// Nameable is something that has a name.
10
27
type Nameable interface {
11
28
// Name returns the name.
@@ -141,18 +158,3 @@ type Database interface {
141
158
type Alterable interface {
142
159
Create (name string , schema Schema ) error
143
160
}
144
-
145
- // ErrInvalidType is thrown when there is an unexpected type at some part of
146
- // the execution tree.
147
- var ErrInvalidType = errors .NewKind ("invalid type: %s" )
148
-
149
- // ErrTableAlreadyExists is thrown when someone tries to create a
150
- // table with a name of an existing one
151
- var ErrTableAlreadyExists = errors .NewKind ("table with name %s already exists" )
152
-
153
- // ErrTableNotFound is returned when the table is not available from the
154
- // current scope.
155
- var ErrTableNotFound = errors .NewKind ("table not found: %s" )
156
-
157
- //ErrUnexpectedRowLength is thrown when the obtained row has more columns than the schema
158
- var ErrUnexpectedRowLength = errors .NewKind ("expected %d values, got %d" )
0 commit comments