github.com/pingcap/br@v5.3.0-alpha.0.20220125034240-ec59c7b6ce30+incompatible/pkg/mock/glue.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/pingcap/br/pkg/lightning/glue/glue.go
     3  
     4  // Package mock is a generated GoMock package.
     5  package mock
     6  
     7  import (
     8  	context "context"
     9  	sql "database/sql"
    10  	gomock "github.com/golang/mock/gomock"
    11  	checkpoints "github.com/pingcap/br/pkg/lightning/checkpoints"
    12  	config "github.com/pingcap/br/pkg/lightning/config"
    13  	glue "github.com/pingcap/br/pkg/lightning/glue"
    14  	log "github.com/pingcap/br/pkg/lightning/log"
    15  	parser "github.com/pingcap/parser"
    16  	model "github.com/pingcap/parser/model"
    17  	reflect "reflect"
    18  )
    19  
    20  // MockGlue is a mock of Glue interface
    21  type MockGlue struct {
    22  	ctrl     *gomock.Controller
    23  	recorder *MockGlueMockRecorder
    24  }
    25  
    26  // MockGlueMockRecorder is the mock recorder for MockGlue
    27  type MockGlueMockRecorder struct {
    28  	mock *MockGlue
    29  }
    30  
    31  // NewMockGlue creates a new mock instance
    32  func NewMockGlue(ctrl *gomock.Controller) *MockGlue {
    33  	mock := &MockGlue{ctrl: ctrl}
    34  	mock.recorder = &MockGlueMockRecorder{mock}
    35  	return mock
    36  }
    37  
    38  // EXPECT returns an object that allows the caller to indicate expected use
    39  func (m *MockGlue) EXPECT() *MockGlueMockRecorder {
    40  	return m.recorder
    41  }
    42  
    43  // OwnsSQLExecutor mocks base method
    44  func (m *MockGlue) OwnsSQLExecutor() bool {
    45  	m.ctrl.T.Helper()
    46  	ret := m.ctrl.Call(m, "OwnsSQLExecutor")
    47  	ret0, _ := ret[0].(bool)
    48  	return ret0
    49  }
    50  
    51  // OwnsSQLExecutor indicates an expected call of OwnsSQLExecutor
    52  func (mr *MockGlueMockRecorder) OwnsSQLExecutor() *gomock.Call {
    53  	mr.mock.ctrl.T.Helper()
    54  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OwnsSQLExecutor", reflect.TypeOf((*MockGlue)(nil).OwnsSQLExecutor))
    55  }
    56  
    57  // GetSQLExecutor mocks base method
    58  func (m *MockGlue) GetSQLExecutor() glue.SQLExecutor {
    59  	m.ctrl.T.Helper()
    60  	ret := m.ctrl.Call(m, "GetSQLExecutor")
    61  	ret0, _ := ret[0].(glue.SQLExecutor)
    62  	return ret0
    63  }
    64  
    65  // GetSQLExecutor indicates an expected call of GetSQLExecutor
    66  func (mr *MockGlueMockRecorder) GetSQLExecutor() *gomock.Call {
    67  	mr.mock.ctrl.T.Helper()
    68  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSQLExecutor", reflect.TypeOf((*MockGlue)(nil).GetSQLExecutor))
    69  }
    70  
    71  // GetDB mocks base method
    72  func (m *MockGlue) GetDB() (*sql.DB, error) {
    73  	m.ctrl.T.Helper()
    74  	ret := m.ctrl.Call(m, "GetDB")
    75  	ret0, _ := ret[0].(*sql.DB)
    76  	ret1, _ := ret[1].(error)
    77  	return ret0, ret1
    78  }
    79  
    80  // GetDB indicates an expected call of GetDB
    81  func (mr *MockGlueMockRecorder) GetDB() *gomock.Call {
    82  	mr.mock.ctrl.T.Helper()
    83  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDB", reflect.TypeOf((*MockGlue)(nil).GetDB))
    84  }
    85  
    86  // GetParser mocks base method
    87  func (m *MockGlue) GetParser() *parser.Parser {
    88  	m.ctrl.T.Helper()
    89  	ret := m.ctrl.Call(m, "GetParser")
    90  	ret0, _ := ret[0].(*parser.Parser)
    91  	return ret0
    92  }
    93  
    94  // GetParser indicates an expected call of GetParser
    95  func (mr *MockGlueMockRecorder) GetParser() *gomock.Call {
    96  	mr.mock.ctrl.T.Helper()
    97  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParser", reflect.TypeOf((*MockGlue)(nil).GetParser))
    98  }
    99  
   100  // GetTables mocks base method
   101  func (m *MockGlue) GetTables(arg0 context.Context, arg1 string) ([]*model.TableInfo, error) {
   102  	m.ctrl.T.Helper()
   103  	ret := m.ctrl.Call(m, "GetTables", arg0, arg1)
   104  	ret0, _ := ret[0].([]*model.TableInfo)
   105  	ret1, _ := ret[1].(error)
   106  	return ret0, ret1
   107  }
   108  
   109  // GetTables indicates an expected call of GetTables
   110  func (mr *MockGlueMockRecorder) GetTables(arg0, arg1 interface{}) *gomock.Call {
   111  	mr.mock.ctrl.T.Helper()
   112  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTables", reflect.TypeOf((*MockGlue)(nil).GetTables), arg0, arg1)
   113  }
   114  
   115  // GetSession mocks base method
   116  func (m *MockGlue) GetSession(arg0 context.Context) (checkpoints.Session, error) {
   117  	m.ctrl.T.Helper()
   118  	ret := m.ctrl.Call(m, "GetSession", arg0)
   119  	ret0, _ := ret[0].(checkpoints.Session)
   120  	ret1, _ := ret[1].(error)
   121  	return ret0, ret1
   122  }
   123  
   124  // GetSession indicates an expected call of GetSession
   125  func (mr *MockGlueMockRecorder) GetSession(arg0 interface{}) *gomock.Call {
   126  	mr.mock.ctrl.T.Helper()
   127  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSession", reflect.TypeOf((*MockGlue)(nil).GetSession), arg0)
   128  }
   129  
   130  // OpenCheckpointsDB mocks base method
   131  func (m *MockGlue) OpenCheckpointsDB(arg0 context.Context, arg1 *config.Config) (checkpoints.DB, error) {
   132  	m.ctrl.T.Helper()
   133  	ret := m.ctrl.Call(m, "OpenCheckpointsDB", arg0, arg1)
   134  	ret0, _ := ret[0].(checkpoints.DB)
   135  	ret1, _ := ret[1].(error)
   136  	return ret0, ret1
   137  }
   138  
   139  // OpenCheckpointsDB indicates an expected call of OpenCheckpointsDB
   140  func (mr *MockGlueMockRecorder) OpenCheckpointsDB(arg0, arg1 interface{}) *gomock.Call {
   141  	mr.mock.ctrl.T.Helper()
   142  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OpenCheckpointsDB", reflect.TypeOf((*MockGlue)(nil).OpenCheckpointsDB), arg0, arg1)
   143  }
   144  
   145  // Record mocks base method
   146  func (m *MockGlue) Record(arg0 string, arg1 uint64) {
   147  	m.ctrl.T.Helper()
   148  	m.ctrl.Call(m, "Record", arg0, arg1)
   149  }
   150  
   151  // Record indicates an expected call of Record
   152  func (mr *MockGlueMockRecorder) Record(arg0, arg1 interface{}) *gomock.Call {
   153  	mr.mock.ctrl.T.Helper()
   154  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Record", reflect.TypeOf((*MockGlue)(nil).Record), arg0, arg1)
   155  }
   156  
   157  // MockSQLExecutor is a mock of SQLExecutor interface
   158  type MockSQLExecutor struct {
   159  	ctrl     *gomock.Controller
   160  	recorder *MockSQLExecutorMockRecorder
   161  }
   162  
   163  // MockSQLExecutorMockRecorder is the mock recorder for MockSQLExecutor
   164  type MockSQLExecutorMockRecorder struct {
   165  	mock *MockSQLExecutor
   166  }
   167  
   168  // NewMockSQLExecutor creates a new mock instance
   169  func NewMockSQLExecutor(ctrl *gomock.Controller) *MockSQLExecutor {
   170  	mock := &MockSQLExecutor{ctrl: ctrl}
   171  	mock.recorder = &MockSQLExecutorMockRecorder{mock}
   172  	return mock
   173  }
   174  
   175  // EXPECT returns an object that allows the caller to indicate expected use
   176  func (m *MockSQLExecutor) EXPECT() *MockSQLExecutorMockRecorder {
   177  	return m.recorder
   178  }
   179  
   180  // ExecuteWithLog mocks base method
   181  func (m *MockSQLExecutor) ExecuteWithLog(ctx context.Context, query, purpose string, logger log.Logger) error {
   182  	m.ctrl.T.Helper()
   183  	ret := m.ctrl.Call(m, "ExecuteWithLog", ctx, query, purpose, logger)
   184  	ret0, _ := ret[0].(error)
   185  	return ret0
   186  }
   187  
   188  // ExecuteWithLog indicates an expected call of ExecuteWithLog
   189  func (mr *MockSQLExecutorMockRecorder) ExecuteWithLog(ctx, query, purpose, logger interface{}) *gomock.Call {
   190  	mr.mock.ctrl.T.Helper()
   191  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ExecuteWithLog", reflect.TypeOf((*MockSQLExecutor)(nil).ExecuteWithLog), ctx, query, purpose, logger)
   192  }
   193  
   194  // ObtainStringWithLog mocks base method
   195  func (m *MockSQLExecutor) ObtainStringWithLog(ctx context.Context, query, purpose string, logger log.Logger) (string, error) {
   196  	m.ctrl.T.Helper()
   197  	ret := m.ctrl.Call(m, "ObtainStringWithLog", ctx, query, purpose, logger)
   198  	ret0, _ := ret[0].(string)
   199  	ret1, _ := ret[1].(error)
   200  	return ret0, ret1
   201  }
   202  
   203  // ObtainStringWithLog indicates an expected call of ObtainStringWithLog
   204  func (mr *MockSQLExecutorMockRecorder) ObtainStringWithLog(ctx, query, purpose, logger interface{}) *gomock.Call {
   205  	mr.mock.ctrl.T.Helper()
   206  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ObtainStringWithLog", reflect.TypeOf((*MockSQLExecutor)(nil).ObtainStringWithLog), ctx, query, purpose, logger)
   207  }
   208  
   209  // QueryStringsWithLog mocks base method
   210  func (m *MockSQLExecutor) QueryStringsWithLog(ctx context.Context, query, purpose string, logger log.Logger) ([][]string, error) {
   211  	m.ctrl.T.Helper()
   212  	ret := m.ctrl.Call(m, "QueryStringsWithLog", ctx, query, purpose, logger)
   213  	ret0, _ := ret[0].([][]string)
   214  	ret1, _ := ret[1].(error)
   215  	return ret0, ret1
   216  }
   217  
   218  // QueryStringsWithLog indicates an expected call of QueryStringsWithLog
   219  func (mr *MockSQLExecutorMockRecorder) QueryStringsWithLog(ctx, query, purpose, logger interface{}) *gomock.Call {
   220  	mr.mock.ctrl.T.Helper()
   221  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "QueryStringsWithLog", reflect.TypeOf((*MockSQLExecutor)(nil).QueryStringsWithLog), ctx, query, purpose, logger)
   222  }
   223  
   224  // Close mocks base method
   225  func (m *MockSQLExecutor) Close() {
   226  	m.ctrl.T.Helper()
   227  	m.ctrl.Call(m, "Close")
   228  }
   229  
   230  // Close indicates an expected call of Close
   231  func (mr *MockSQLExecutorMockRecorder) Close() *gomock.Call {
   232  	mr.mock.ctrl.T.Helper()
   233  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockSQLExecutor)(nil).Close))
   234  }