File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1
- // Copyright © 2022 Kaleido, Inc.
1
+ // Copyright © 2023 Kaleido, Inc.
2
2
//
3
3
// SPDX-License-Identifier: Apache-2.0
4
4
//
@@ -110,6 +110,10 @@ func (s *Database) ConnLimit() int {
110
110
return s .connLimit
111
111
}
112
112
113
+ func (s * Database ) Features () SQLFeatures {
114
+ return s .features
115
+ }
116
+
113
117
func (s * Database ) SequenceColumn () string {
114
118
return s .sequenceColumn
115
119
}
Original file line number Diff line number Diff line change 1
- // Copyright © 2021 Kaleido, Inc.
1
+ // Copyright © 2023 Kaleido, Inc.
2
2
//
3
3
// SPDX-License-Identifier: Apache-2.0
4
4
//
@@ -64,6 +64,19 @@ func TestInitDatabaseConnsAndSeqCol(t *testing.T) {
64
64
assert .Equal (t , "seq" , s .SequenceColumn ())
65
65
}
66
66
67
+ func TestInitDatabaseFeatures (t * testing.T ) {
68
+ s := & Database {}
69
+ tp := newMockProvider ()
70
+ s .InitConfig (tp , tp .config )
71
+ err := s .Init (context .Background (), tp , tp .config )
72
+ assert .NoError (t , err )
73
+ assert .NotNil (t , s .DB ())
74
+
75
+ assert .NotNil (t , s .Features ())
76
+ assert .Equal (t , true , s .Features ().UseILIKE )
77
+ assert .Equal (t , false , s .Features ().MultiRowInsert )
78
+ }
79
+
67
80
func TestInitDatabaseOpenFailed (t * testing.T ) {
68
81
mp := newMockProvider ()
69
82
mp .openError = fmt .Errorf ("pop" )
You can’t perform that action at this time.
0 commit comments