@@ -29,6 +29,10 @@ func columnError(err error, colIdx int) error {
29
29
return fmt .Errorf ("%w: %s: %d" , err , columnErrMsg , colIdx )
30
30
}
31
31
32
+ func columnCountError (actual int , expected int ) error {
33
+ return fmt .Errorf ("%s: expected %d, got %d" , columnCountErrMsg , expected , actual )
34
+ }
35
+
32
36
func unsupportedTypeError (name string ) error {
33
37
return fmt .Errorf ("%s: %s" , unsupportedTypeErrMsg , name )
34
38
}
@@ -46,6 +50,7 @@ const (
46
50
castErrMsg = "cast error"
47
51
structFieldErrMsg = "invalid STRUCT field"
48
52
columnErrMsg = "column index"
53
+ columnCountErrMsg = "invalid column count"
49
54
unsupportedTypeErrMsg = "unsupported data type"
50
55
invalidatedAppenderMsg = "appended data has been invalidated due to corrupt row"
51
56
)
63
68
errAppenderDoubleClose = errors .New ("could not close appender: already closed" )
64
69
errAppenderAppendRow = errors .New ("could not append row" )
65
70
errAppenderAppendAfterClose = errors .New ("could not append row: appender already closed" )
66
- errAppenderClose = errors .New ("could not close appender" )
67
- errAppenderFlush = errors .New ("could not flush appender" )
71
+ // FIXME: not covered by tests. Should be triggered by appending a constraint violation, see #210.
72
+ errAppenderClose = errors .New ("could not close appender" )
73
+ // FIXME: not covered by tests. Should be triggered by appending a constraint violation, see #210.
74
+ errAppenderFlush = errors .New ("could not flush appender" )
68
75
69
76
// Errors not covered in tests.
70
77
errConnect = errors .New ("could not connect to database" )
0 commit comments