// Code generated by MockGen. DO NOT EDIT.
// Source: db.go

// Package mock_db is a generated GoMock package.
package mock_db

import (
	reflect "reflect"

	options "github.com/cloudwan/gohan/db/options"
	transaction "github.com/cloudwan/gohan/db/transaction"
	schema "github.com/cloudwan/gohan/schema"
	gomock "github.com/golang/mock/gomock"
)

// MockDB is a mock of DB interface
type MockDB struct {
	ctrl     *gomock.Controller
	recorder *MockDBMockRecorder
}

// MockDBMockRecorder is the mock recorder for MockDB
type MockDBMockRecorder struct {
	mock *MockDB
}

// NewMockDB creates a new mock instance
func NewMockDB(ctrl *gomock.Controller) *MockDB {
	mock := &MockDB{ctrl: ctrl}
	mock.recorder = &MockDBMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockDB) EXPECT() *MockDBMockRecorder {
	return m.recorder
}

// Connect mocks base method
func (m *MockDB) Connect(arg0, arg1 string, arg2 int) error {
	ret := m.ctrl.Call(m, "Connect", arg0, arg1, arg2)
	ret0, _ := ret[0].(error)
	return ret0
}

// Connect indicates an expected call of Connect
func (mr *MockDBMockRecorder) Connect(arg0, arg1, arg2 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Connect", reflect.TypeOf((*MockDB)(nil).Connect), arg0, arg1, arg2)
}

// Close mocks base method
func (m *MockDB) Close() {
	m.ctrl.Call(m, "Close")
}

// Close indicates an expected call of Close
func (mr *MockDBMockRecorder) Close() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockDB)(nil).Close))
}

// BeginTx mocks base method
func (m *MockDB) BeginTx(options ...transaction.Option) (transaction.Transaction, error) {
	varargs := []interface{}{}
	for _, a := range options {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "BeginTx", varargs...)
	ret0, _ := ret[0].(transaction.Transaction)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// BeginTx indicates an expected call of BeginTx
func (mr *MockDBMockRecorder) BeginTx(options ...interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BeginTx", reflect.TypeOf((*MockDB)(nil).BeginTx), options...)
}

// RegisterTable mocks base method
func (m *MockDB) RegisterTable(s *schema.Schema, cascade, migrate bool) error {
	ret := m.ctrl.Call(m, "RegisterTable", s, cascade, migrate)
	ret0, _ := ret[0].(error)
	return ret0
}

// RegisterTable indicates an expected call of RegisterTable
func (mr *MockDBMockRecorder) RegisterTable(s, cascade, migrate interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegisterTable", reflect.TypeOf((*MockDB)(nil).RegisterTable), s, cascade, migrate)
}

// DropTable mocks base method
func (m *MockDB) DropTable(arg0 *schema.Schema) error {
	ret := m.ctrl.Call(m, "DropTable", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}

// DropTable indicates an expected call of DropTable
func (mr *MockDBMockRecorder) DropTable(arg0 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropTable", reflect.TypeOf((*MockDB)(nil).DropTable), arg0)
}

// Options mocks base method
func (m *MockDB) Options() options.Options {
	ret := m.ctrl.Call(m, "Options")
	ret0, _ := ret[0].(options.Options)
	return ret0
}

// Options indicates an expected call of Options
func (mr *MockDBMockRecorder) Options() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Options", reflect.TypeOf((*MockDB)(nil).Options))
}

// MockITransaction is a mock of ITransaction interface
type MockITransaction struct {
	ctrl     *gomock.Controller
	recorder *MockITransactionMockRecorder
}

// MockITransactionMockRecorder is the mock recorder for MockITransaction
type MockITransactionMockRecorder struct {
	mock *MockITransaction
}

// NewMockITransaction creates a new mock instance
func NewMockITransaction(ctrl *gomock.Controller) *MockITransaction {
	mock := &MockITransaction{ctrl: ctrl}
	mock.recorder = &MockITransactionMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockITransaction) EXPECT() *MockITransactionMockRecorder {
	return m.recorder
}

// Commit mocks base method
func (m *MockITransaction) Commit() error {
	ret := m.ctrl.Call(m, "Commit")
	ret0, _ := ret[0].(error)
	return ret0
}

// Commit indicates an expected call of Commit
func (mr *MockITransactionMockRecorder) Commit() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockITransaction)(nil).Commit))
}

// Close mocks base method
func (m *MockITransaction) Close() error {
	ret := m.ctrl.Call(m, "Close")
	ret0, _ := ret[0].(error)
	return ret0
}

// Close indicates an expected call of Close
func (mr *MockITransactionMockRecorder) Close() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockITransaction)(nil).Close))
}

// Closed mocks base method
func (m *MockITransaction) Closed() bool {
	ret := m.ctrl.Call(m, "Closed")
	ret0, _ := ret[0].(bool)
	return ret0
}

// Closed indicates an expected call of Closed
func (mr *MockITransactionMockRecorder) Closed() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Closed", reflect.TypeOf((*MockITransaction)(nil).Closed))
}
