github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/mock/glue_checkpoint.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/pingcap/br/pkg/lightning/checkpoints/glue_checkpoint.go 3 4 // Package mock is a generated GoMock package. 5 package mock 6 7 import ( 8 context "context" 9 gomock "github.com/golang/mock/gomock" 10 ast "github.com/pingcap/parser/ast" 11 types "github.com/pingcap/tidb/types" 12 sqlexec "github.com/pingcap/tidb/util/sqlexec" 13 reflect "reflect" 14 ) 15 16 // MockSession is a mock of Session interface 17 type MockSession struct { 18 ctrl *gomock.Controller 19 recorder *MockSessionMockRecorder 20 } 21 22 // MockSessionMockRecorder is the mock recorder for MockSession 23 type MockSessionMockRecorder struct { 24 mock *MockSession 25 } 26 27 // NewMockSession creates a new mock instance 28 func NewMockSession(ctrl *gomock.Controller) *MockSession { 29 mock := &MockSession{ctrl: ctrl} 30 mock.recorder = &MockSessionMockRecorder{mock} 31 return mock 32 } 33 34 // EXPECT returns an object that allows the caller to indicate expected use 35 func (m *MockSession) EXPECT() *MockSessionMockRecorder { 36 return m.recorder 37 } 38 39 // Close mocks base method 40 func (m *MockSession) Close() { 41 m.ctrl.T.Helper() 42 m.ctrl.Call(m, "Close") 43 } 44 45 // Close indicates an expected call of Close 46 func (mr *MockSessionMockRecorder) Close() *gomock.Call { 47 mr.mock.ctrl.T.Helper() 48 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSession)(nil).Close)) 49 } 50 51 // Execute mocks base method 52 func (m *MockSession) Execute(arg0 context.Context, arg1 string) ([]sqlexec.RecordSet, error) { 53 m.ctrl.T.Helper() 54 ret := m.ctrl.Call(m, "Execute", arg0, arg1) 55 ret0, _ := ret[0].([]sqlexec.RecordSet) 56 ret1, _ := ret[1].(error) 57 return ret0, ret1 58 } 59 60 // Execute indicates an expected call of Execute 61 func (mr *MockSessionMockRecorder) Execute(arg0, arg1 interface{}) *gomock.Call { 62 mr.mock.ctrl.T.Helper() 63 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Execute", reflect.TypeOf((*MockSession)(nil).Execute), arg0, arg1) 64 } 65 66 // CommitTxn mocks base method 67 func (m *MockSession) CommitTxn(arg0 context.Context) error { 68 m.ctrl.T.Helper() 69 ret := m.ctrl.Call(m, "CommitTxn", arg0) 70 ret0, _ := ret[0].(error) 71 return ret0 72 } 73 74 // CommitTxn indicates an expected call of CommitTxn 75 func (mr *MockSessionMockRecorder) CommitTxn(arg0 interface{}) *gomock.Call { 76 mr.mock.ctrl.T.Helper() 77 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CommitTxn", reflect.TypeOf((*MockSession)(nil).CommitTxn), arg0) 78 } 79 80 // RollbackTxn mocks base method 81 func (m *MockSession) RollbackTxn(arg0 context.Context) { 82 m.ctrl.T.Helper() 83 m.ctrl.Call(m, "RollbackTxn", arg0) 84 } 85 86 // RollbackTxn indicates an expected call of RollbackTxn 87 func (mr *MockSessionMockRecorder) RollbackTxn(arg0 interface{}) *gomock.Call { 88 mr.mock.ctrl.T.Helper() 89 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollbackTxn", reflect.TypeOf((*MockSession)(nil).RollbackTxn), arg0) 90 } 91 92 // PrepareStmt mocks base method 93 func (m *MockSession) PrepareStmt(sql string) (uint32, int, []*ast.ResultField, error) { 94 m.ctrl.T.Helper() 95 ret := m.ctrl.Call(m, "PrepareStmt", sql) 96 ret0, _ := ret[0].(uint32) 97 ret1, _ := ret[1].(int) 98 ret2, _ := ret[2].([]*ast.ResultField) 99 ret3, _ := ret[3].(error) 100 return ret0, ret1, ret2, ret3 101 } 102 103 // PrepareStmt indicates an expected call of PrepareStmt 104 func (mr *MockSessionMockRecorder) PrepareStmt(sql interface{}) *gomock.Call { 105 mr.mock.ctrl.T.Helper() 106 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PrepareStmt", reflect.TypeOf((*MockSession)(nil).PrepareStmt), sql) 107 } 108 109 // ExecutePreparedStmt mocks base method 110 func (m *MockSession) ExecutePreparedStmt(ctx context.Context, stmtID uint32, param []types.Datum) (sqlexec.RecordSet, error) { 111 m.ctrl.T.Helper() 112 ret := m.ctrl.Call(m, "ExecutePreparedStmt", ctx, stmtID, param) 113 ret0, _ := ret[0].(sqlexec.RecordSet) 114 ret1, _ := ret[1].(error) 115 return ret0, ret1 116 } 117 118 // ExecutePreparedStmt indicates an expected call of ExecutePreparedStmt 119 func (mr *MockSessionMockRecorder) ExecutePreparedStmt(ctx, stmtID, param interface{}) *gomock.Call { 120 mr.mock.ctrl.T.Helper() 121 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecutePreparedStmt", reflect.TypeOf((*MockSession)(nil).ExecutePreparedStmt), ctx, stmtID, param) 122 } 123 124 // DropPreparedStmt mocks base method 125 func (m *MockSession) DropPreparedStmt(stmtID uint32) error { 126 m.ctrl.T.Helper() 127 ret := m.ctrl.Call(m, "DropPreparedStmt", stmtID) 128 ret0, _ := ret[0].(error) 129 return ret0 130 } 131 132 // DropPreparedStmt indicates an expected call of DropPreparedStmt 133 func (mr *MockSessionMockRecorder) DropPreparedStmt(stmtID interface{}) *gomock.Call { 134 mr.mock.ctrl.T.Helper() 135 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropPreparedStmt", reflect.TypeOf((*MockSession)(nil).DropPreparedStmt), stmtID) 136 }