-
Notifications
You must be signed in to change notification settings - Fork 0
/
glue_checkpoint.go
137 lines (116 loc) · 4.61 KB
/
glue_checkpoint.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
// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/wuhuizuo/tidb6/br/pkg/lightning/checkpoints/glue_checkpoint.go
// Package mock is a generated GoMock package.
package mock
import (
context "context"
reflect "reflect"
gomock "github.com/golang/mock/gomock"
ast "github.com/wuhuizuo/tidb6/parser/ast"
types "github.com/wuhuizuo/tidb6/types"
sqlexec "github.com/wuhuizuo/tidb6/util/sqlexec"
)
// MockSession is a mock of Session interface
type MockSession struct {
ctrl *gomock.Controller
recorder *MockSessionMockRecorder
}
// MockSessionMockRecorder is the mock recorder for MockSession
type MockSessionMockRecorder struct {
mock *MockSession
}
// NewMockSession creates a new mock instance
func NewMockSession(ctrl *gomock.Controller) *MockSession {
mock := &MockSession{ctrl: ctrl}
mock.recorder = &MockSessionMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockSession) EXPECT() *MockSessionMockRecorder {
return m.recorder
}
// Close mocks base method
func (m *MockSession) Close() {
m.ctrl.T.Helper()
m.ctrl.Call(m, "Close")
}
// Close indicates an expected call of Close
func (mr *MockSessionMockRecorder) Close() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSession)(nil).Close))
}
// Execute mocks base method
func (m *MockSession) Execute(arg0 context.Context, arg1 string) ([]sqlexec.RecordSet, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Execute", arg0, arg1)
ret0, _ := ret[0].([]sqlexec.RecordSet)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Execute indicates an expected call of Execute
func (mr *MockSessionMockRecorder) Execute(arg0, arg1 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockSession)(nil).Execute), arg0, arg1)
}
// CommitTxn mocks base method
func (m *MockSession) CommitTxn(arg0 context.Context) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CommitTxn", arg0)
ret0, _ := ret[0].(error)
return ret0
}
// CommitTxn indicates an expected call of CommitTxn
func (mr *MockSessionMockRecorder) CommitTxn(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitTxn", reflect.TypeOf((*MockSession)(nil).CommitTxn), arg0)
}
// RollbackTxn mocks base method
func (m *MockSession) RollbackTxn(arg0 context.Context) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "RollbackTxn", arg0)
}
// RollbackTxn indicates an expected call of RollbackTxn
func (mr *MockSessionMockRecorder) RollbackTxn(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackTxn", reflect.TypeOf((*MockSession)(nil).RollbackTxn), arg0)
}
// PrepareStmt mocks base method
func (m *MockSession) PrepareStmt(sql string) (uint32, int, []*ast.ResultField, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "PrepareStmt", sql)
ret0, _ := ret[0].(uint32)
ret1, _ := ret[1].(int)
ret2, _ := ret[2].([]*ast.ResultField)
ret3, _ := ret[3].(error)
return ret0, ret1, ret2, ret3
}
// PrepareStmt indicates an expected call of PrepareStmt
func (mr *MockSessionMockRecorder) PrepareStmt(sql interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareStmt", reflect.TypeOf((*MockSession)(nil).PrepareStmt), sql)
}
// ExecutePreparedStmt mocks base method
func (m *MockSession) ExecutePreparedStmt(ctx context.Context, stmtID uint32, param []types.Datum) (sqlexec.RecordSet, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ExecutePreparedStmt", ctx, stmtID, param)
ret0, _ := ret[0].(sqlexec.RecordSet)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ExecutePreparedStmt indicates an expected call of ExecutePreparedStmt
func (mr *MockSessionMockRecorder) ExecutePreparedStmt(ctx, stmtID, param interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutePreparedStmt", reflect.TypeOf((*MockSession)(nil).ExecutePreparedStmt), ctx, stmtID, param)
}
// DropPreparedStmt mocks base method
func (m *MockSession) DropPreparedStmt(stmtID uint32) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DropPreparedStmt", stmtID)
ret0, _ := ret[0].(error)
return ret0
}
// DropPreparedStmt indicates an expected call of DropPreparedStmt
func (mr *MockSessionMockRecorder) DropPreparedStmt(stmtID interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropPreparedStmt", reflect.TypeOf((*MockSession)(nil).DropPreparedStmt), stmtID)
}