-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
mock_queryservice.go
147 lines (119 loc) · 5.85 KB
/
mock_queryservice.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
// Automatically generated by MockGen. DO NOT EDIT!
// Source: queryservice.go
package queryservice_testing
import (
gomock "github.com/golang/mock/gomock"
sqltypes "github.com/youtube/vitess/go/sqltypes"
query "github.com/youtube/vitess/go/vt/proto/query"
querytypes "github.com/youtube/vitess/go/vt/tabletserver/querytypes"
context "golang.org/x/net/context"
)
// Mock of QueryService interface
type MockQueryService struct {
ctrl *gomock.Controller
recorder *_MockQueryServiceRecorder
}
// Recorder for MockQueryService (not exported)
type _MockQueryServiceRecorder struct {
mock *MockQueryService
}
func NewMockQueryService(ctrl *gomock.Controller) *MockQueryService {
mock := &MockQueryService{ctrl: ctrl}
mock.recorder = &_MockQueryServiceRecorder{mock}
return mock
}
func (_m *MockQueryService) EXPECT() *_MockQueryServiceRecorder {
return _m.recorder
}
func (_m *MockQueryService) Begin(ctx context.Context, target *query.Target) (int64, error) {
ret := _m.ctrl.Call(_m, "Begin", ctx, target)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockQueryServiceRecorder) Begin(arg0, arg1 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Begin", arg0, arg1)
}
func (_m *MockQueryService) Commit(ctx context.Context, target *query.Target, transactionID int64) error {
ret := _m.ctrl.Call(_m, "Commit", ctx, target, transactionID)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockQueryServiceRecorder) Commit(arg0, arg1, arg2 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Commit", arg0, arg1, arg2)
}
func (_m *MockQueryService) Rollback(ctx context.Context, target *query.Target, transactionID int64) error {
ret := _m.ctrl.Call(_m, "Rollback", ctx, target, transactionID)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockQueryServiceRecorder) Rollback(arg0, arg1, arg2 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Rollback", arg0, arg1, arg2)
}
func (_m *MockQueryService) Execute(ctx context.Context, target *query.Target, sql string, bindVariables map[string]interface{}, transactionID int64) (*sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "Execute", ctx, target, sql, bindVariables, transactionID)
ret0, _ := ret[0].(*sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockQueryServiceRecorder) Execute(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "Execute", arg0, arg1, arg2, arg3, arg4)
}
func (_m *MockQueryService) StreamExecute(ctx context.Context, target *query.Target, sql string, bindVariables map[string]interface{}, sendReply func(*sqltypes.Result) error) error {
ret := _m.ctrl.Call(_m, "StreamExecute", ctx, target, sql, bindVariables, sendReply)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockQueryServiceRecorder) StreamExecute(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamExecute", arg0, arg1, arg2, arg3, arg4)
}
func (_m *MockQueryService) ExecuteBatch(ctx context.Context, target *query.Target, queries []querytypes.BoundQuery, asTransaction bool, transactionID int64) ([]sqltypes.Result, error) {
ret := _m.ctrl.Call(_m, "ExecuteBatch", ctx, target, queries, asTransaction, transactionID)
ret0, _ := ret[0].([]sqltypes.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockQueryServiceRecorder) ExecuteBatch(arg0, arg1, arg2, arg3, arg4 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "ExecuteBatch", arg0, arg1, arg2, arg3, arg4)
}
func (_m *MockQueryService) SplitQuery(ctx context.Context, target *query.Target, sql string, bindVariables map[string]interface{}, splitColumn string, splitCount int64) ([]querytypes.QuerySplit, error) {
ret := _m.ctrl.Call(_m, "SplitQuery", ctx, target, sql, bindVariables, splitColumn, splitCount)
ret0, _ := ret[0].([]querytypes.QuerySplit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockQueryServiceRecorder) 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 *MockQueryService) SplitQueryV2(ctx context.Context, target *query.Target, sql string, bindVariables map[string]interface{}, splitColumns []string, splitCount int64, numRowsPerQueryPart int64, algorithm query.SplitQueryRequest_Algorithm) ([]querytypes.QuerySplit, error) {
ret := _m.ctrl.Call(_m, "SplitQueryV2", ctx, target, sql, bindVariables, splitColumns, splitCount, numRowsPerQueryPart, algorithm)
ret0, _ := ret[0].([]querytypes.QuerySplit)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockQueryServiceRecorder) 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 *MockQueryService) StreamHealthRegister(_param0 chan<- *query.StreamHealthResponse) (int, error) {
ret := _m.ctrl.Call(_m, "StreamHealthRegister", _param0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
func (_mr *_MockQueryServiceRecorder) StreamHealthRegister(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamHealthRegister", arg0)
}
func (_m *MockQueryService) StreamHealthUnregister(_param0 int) error {
ret := _m.ctrl.Call(_m, "StreamHealthUnregister", _param0)
ret0, _ := ret[0].(error)
return ret0
}
func (_mr *_MockQueryServiceRecorder) StreamHealthUnregister(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "StreamHealthUnregister", arg0)
}
func (_m *MockQueryService) HandlePanic(_param0 *error) {
_m.ctrl.Call(_m, "HandlePanic", _param0)
}
func (_mr *_MockQueryServiceRecorder) HandlePanic(arg0 interface{}) *gomock.Call {
return _mr.mock.ctrl.RecordCall(_mr.mock, "HandlePanic", arg0)
}