forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mock_vtgateservice.go
223 lines (181 loc) · 11.2 KB
/
mock_vtgateservice.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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
// Automatically generated by MockGen. DO NOT EDIT!
// Source: interface.go
package vtgateservice_testing
import (
gomock "github.com/golang/mock/gomock"
sqltypes "github.com/youtube/vitess/go/sqltypes"
query "github.com/youtube/vitess/go/vt/proto/query"
topodata "github.com/youtube/vitess/go/vt/proto/topodata"
vtgate "github.com/youtube/vitess/go/vt/proto/vtgate"
context "golang.org/x/net/context"
)
// Mock of VTGateService interface
type MockVTGateService struct {
ctrl *gomock.Controller
recorder *_MockVTGateServiceRecorder
}
// Recorder for MockVTGateService (not exported)
type _MockVTGateServiceRecorder struct {
mock *MockVTGateService
}
func NewMockVTGateService(ctrl *gomock.Controller) *MockVTGateService {
mock := &MockVTGateService{ctrl: ctrl}
mock.recorder = &_MockVTGateServiceRecorder{mock}
return mock
}
func (_m *MockVTGateService) EXPECT() *_MockVTGateServiceRecorder {
return _m.recorder
}
func (_m *MockVTGateService) Execute(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, tabletType topodata.TabletType, session *vtgate.Session, notInTransaction bool) (*sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "Execute", ctx, sql, bindVariables, keyspace, tabletType, session, notInTransaction)
ret0, _ := ret[0].(*sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) Execute(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Execute", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
}
func (_m *MockVTGateService) ExecuteShards(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, shards []string, tabletType topodata.TabletType, session *vtgate.Session, notInTransaction bool) (*sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteShards", ctx, sql, bindVariables, keyspace, shards, tabletType, session, notInTransaction)
ret0, _ := ret[0].(*sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) ExecuteShards(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteShards", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
}
func (_m *MockVTGateService) ExecuteKeyspaceIds(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, keyspaceIds [][]byte, tabletType topodata.TabletType, session *vtgate.Session, notInTransaction bool) (*sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteKeyspaceIds", ctx, sql, bindVariables, keyspace, keyspaceIds, tabletType, session, notInTransaction)
ret0, _ := ret[0].(*sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) ExecuteKeyspaceIds(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteKeyspaceIds", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
}
func (_m *MockVTGateService) ExecuteKeyRanges(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, keyRanges []*topodata.KeyRange, tabletType topodata.TabletType, session *vtgate.Session, notInTransaction bool) (*sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteKeyRanges", ctx, sql, bindVariables, keyspace, keyRanges, tabletType, session, notInTransaction)
ret0, _ := ret[0].(*sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) ExecuteKeyRanges(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteKeyRanges", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
}
func (_m *MockVTGateService) ExecuteEntityIds(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, entityColumnName string, entityKeyspaceIDs []*vtgate.ExecuteEntityIdsRequest_EntityId, tabletType topodata.TabletType, session *vtgate.Session, notInTransaction bool) (*sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteEntityIds", ctx, sql, bindVariables, keyspace, entityColumnName, entityKeyspaceIDs, tabletType, session, notInTransaction)
ret0, _ := ret[0].(*sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) ExecuteEntityIds(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteEntityIds", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
}
func (_m *MockVTGateService) ExecuteBatchShards(ctx context.Context, queries []*vtgate.BoundShardQuery, tabletType topodata.TabletType, asTransaction bool, session *vtgate.Session) ([]sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteBatchShards", ctx, queries, tabletType, asTransaction, session)
ret0, _ := ret[0].([]sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) ExecuteBatchShards(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteBatchShards", arg0, arg1, arg2, arg3, arg4)
}
func (_m *MockVTGateService) ExecuteBatchKeyspaceIds(ctx context.Context, queries []*vtgate.BoundKeyspaceIdQuery, tabletType topodata.TabletType, asTransaction bool, session *vtgate.Session) ([]sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteBatchKeyspaceIds", ctx, queries, tabletType, asTransaction, session)
ret0, _ := ret[0].([]sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) ExecuteBatchKeyspaceIds(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteBatchKeyspaceIds", arg0, arg1, arg2, arg3, arg4)
}
func (_m *MockVTGateService) StreamExecute(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, tabletType topodata.TabletType, sendReply func(*sqltypes.Result) error) error {
ret := _m.ctrl.Call(_m, "StreamExecute", ctx, sql, bindVariables, keyspace, tabletType, sendReply)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockVTGateServiceRecorder) StreamExecute(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamExecute", arg0, arg1, arg2, arg3, arg4, arg5)
}
func (_m *MockVTGateService) StreamExecuteShards(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, shards []string, tabletType topodata.TabletType, sendReply func(*sqltypes.Result) error) error {
ret := _m.ctrl.Call(_m, "StreamExecuteShards", ctx, sql, bindVariables, keyspace, shards, tabletType, sendReply)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockVTGateServiceRecorder) StreamExecuteShards(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamExecuteShards", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
}
func (_m *MockVTGateService) StreamExecuteKeyspaceIds(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, keyspaceIds [][]byte, tabletType topodata.TabletType, sendReply func(*sqltypes.Result) error) error {
ret := _m.ctrl.Call(_m, "StreamExecuteKeyspaceIds", ctx, sql, bindVariables, keyspace, keyspaceIds, tabletType, sendReply)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockVTGateServiceRecorder) StreamExecuteKeyspaceIds(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamExecuteKeyspaceIds", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
}
func (_m *MockVTGateService) StreamExecuteKeyRanges(ctx context.Context, sql string, bindVariables map[string]interface{}, keyspace string, keyRanges []*topodata.KeyRange, tabletType topodata.TabletType, sendReply func(*sqltypes.Result) error) error {
ret := _m.ctrl.Call(_m, "StreamExecuteKeyRanges", ctx, sql, bindVariables, keyspace, keyRanges, tabletType, sendReply)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockVTGateServiceRecorder) StreamExecuteKeyRanges(arg0, arg1, arg2, arg3, arg4, arg5, arg6 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamExecuteKeyRanges", arg0, arg1, arg2, arg3, arg4, arg5, arg6)
}
func (_m *MockVTGateService) Begin(ctx context.Context) (*vtgate.Session, error) {
ret := _m.ctrl.Call(_m, "Begin", ctx)
ret0, _ := ret[0].(*vtgate.Session)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) Begin(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Begin", arg0)
}
func (_m *MockVTGateService) Commit(ctx context.Context, session *vtgate.Session) error {
ret := _m.ctrl.Call(_m, "Commit", ctx, session)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockVTGateServiceRecorder) Commit(arg0, arg1 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Commit", arg0, arg1)
}
func (_m *MockVTGateService) Rollback(ctx context.Context, session *vtgate.Session) error {
ret := _m.ctrl.Call(_m, "Rollback", ctx, session)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockVTGateServiceRecorder) Rollback(arg0, arg1 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Rollback", arg0, arg1)
}
func (_m *MockVTGateService) SplitQuery(ctx context.Context, keyspace string, sql string, bindVariables map[string]interface{}, splitColumn string, splitCount int64) ([]*vtgate.SplitQueryResponse_Part, error) {
ret := _m.ctrl.Call(_m, "SplitQuery", ctx, keyspace, sql, bindVariables, splitColumn, splitCount)
ret0, _ := ret[0].([]*vtgate.SplitQueryResponse_Part)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) SplitQuery(arg0, arg1, arg2, arg3, arg4, arg5 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "SplitQuery", arg0, arg1, arg2, arg3, arg4, arg5)
}
func (_m *MockVTGateService) SplitQueryV2(ctx context.Context, keyspace string, sql string, bindVariables map[string]interface{}, splitColumns []string, splitCount int64, numRowsPerQueryPart int64, algorithm query.SplitQueryRequest_Algorithm) ([]*vtgate.SplitQueryResponse_Part, error) {
ret := _m.ctrl.Call(_m, "SplitQueryV2", ctx, keyspace, sql, bindVariables, splitColumns, splitCount, numRowsPerQueryPart, algorithm)
ret0, _ := ret[0].([]*vtgate.SplitQueryResponse_Part)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) SplitQueryV2(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "SplitQueryV2", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
}
func (_m *MockVTGateService) GetSrvKeyspace(ctx context.Context, keyspace string) (*topodata.SrvKeyspace, error) {
ret := _m.ctrl.Call(_m, "GetSrvKeyspace", ctx, keyspace)
ret0, _ := ret[0].(*topodata.SrvKeyspace)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockVTGateServiceRecorder) GetSrvKeyspace(arg0, arg1 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "GetSrvKeyspace", arg0, arg1)
}
func (_m *MockVTGateService) HandlePanic(err *error) {
_m.ctrl.Call(_m, "HandlePanic", err)
}
func (_mr *_MockVTGateServiceRecorder) HandlePanic(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "HandlePanic", arg0)
}