// Code generated by mockery. DO NOT EDIT.

package mocks

import (
	context "context"
	sql "database/sql"

	mock "github.com/stretchr/testify/mock"
)

// DBer is an autogenerated mock type for the DBer type
type DBer struct {
	mock.Mock
}

type DBer_Expecter struct {
	mock *mock.Mock
}

func (_m *DBer) EXPECT() *DBer_Expecter {
	return &DBer_Expecter{mock: &_m.Mock}
}

// BeginTx provides a mock function with given fields: ctx, opts
func (_m *DBer) BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error) {
	ret := _m.Called(ctx, opts)

	if len(ret) == 0 {
		panic("no return value specified for BeginTx")
	}

	var r0 *sql.Tx
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *sql.TxOptions) (*sql.Tx, error)); ok {
		return rf(ctx, opts)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *sql.TxOptions) *sql.Tx); ok {
		r0 = rf(ctx, opts)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sql.Tx)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *sql.TxOptions) error); ok {
		r1 = rf(ctx, opts)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DBer_BeginTx_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginTx'
type DBer_BeginTx_Call struct {
	*mock.Call
}

// BeginTx is a helper method to define mock.On call
//   - ctx context.Context
//   - opts *sql.TxOptions
func (_e *DBer_Expecter) BeginTx(ctx interface{}, opts interface{}) *DBer_BeginTx_Call {
	return &DBer_BeginTx_Call{Call: _e.mock.On("BeginTx", ctx, opts)}
}

func (_c *DBer_BeginTx_Call) Run(run func(ctx context.Context, opts *sql.TxOptions)) *DBer_BeginTx_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*sql.TxOptions))
	})
	return _c
}

func (_c *DBer_BeginTx_Call) Return(_a0 *sql.Tx, _a1 error) *DBer_BeginTx_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *DBer_BeginTx_Call) RunAndReturn(run func(context.Context, *sql.TxOptions) (*sql.Tx, error)) *DBer_BeginTx_Call {
	_c.Call.Return(run)
	return _c
}

// Exec provides a mock function with given fields: query, args
func (_m *DBer) Exec(query string, args ...interface{}) (sql.Result, error) {
	var _ca []interface{}
	_ca = append(_ca, query)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for Exec")
	}

	var r0 sql.Result
	var r1 error
	if rf, ok := ret.Get(0).(func(string, ...interface{}) (sql.Result, error)); ok {
		return rf(query, args...)
	}
	if rf, ok := ret.Get(0).(func(string, ...interface{}) sql.Result); ok {
		r0 = rf(query, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(sql.Result)
		}
	}

	if rf, ok := ret.Get(1).(func(string, ...interface{}) error); ok {
		r1 = rf(query, args...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DBer_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
type DBer_Exec_Call struct {
	*mock.Call
}

// Exec is a helper method to define mock.On call
//   - query string
//   - args ...interface{}
func (_e *DBer_Expecter) Exec(query interface{}, args ...interface{}) *DBer_Exec_Call {
	return &DBer_Exec_Call{Call: _e.mock.On("Exec",
		append([]interface{}{query}, args...)...)}
}

func (_c *DBer_Exec_Call) Run(run func(query string, args ...interface{})) *DBer_Exec_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]interface{}, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		run(args[0].(string), variadicArgs...)
	})
	return _c
}

func (_c *DBer_Exec_Call) Return(_a0 sql.Result, _a1 error) *DBer_Exec_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *DBer_Exec_Call) RunAndReturn(run func(string, ...interface{}) (sql.Result, error)) *DBer_Exec_Call {
	_c.Call.Return(run)
	return _c
}

// Query provides a mock function with given fields: query, args
func (_m *DBer) Query(query string, args ...interface{}) (*sql.Rows, error) {
	var _ca []interface{}
	_ca = append(_ca, query)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for Query")
	}

	var r0 *sql.Rows
	var r1 error
	if rf, ok := ret.Get(0).(func(string, ...interface{}) (*sql.Rows, error)); ok {
		return rf(query, args...)
	}
	if rf, ok := ret.Get(0).(func(string, ...interface{}) *sql.Rows); ok {
		r0 = rf(query, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sql.Rows)
		}
	}

	if rf, ok := ret.Get(1).(func(string, ...interface{}) error); ok {
		r1 = rf(query, args...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DBer_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
type DBer_Query_Call struct {
	*mock.Call
}

// Query is a helper method to define mock.On call
//   - query string
//   - args ...interface{}
func (_e *DBer_Expecter) Query(query interface{}, args ...interface{}) *DBer_Query_Call {
	return &DBer_Query_Call{Call: _e.mock.On("Query",
		append([]interface{}{query}, args...)...)}
}

func (_c *DBer_Query_Call) Run(run func(query string, args ...interface{})) *DBer_Query_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]interface{}, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		run(args[0].(string), variadicArgs...)
	})
	return _c
}

func (_c *DBer_Query_Call) Return(_a0 *sql.Rows, _a1 error) *DBer_Query_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *DBer_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *DBer_Query_Call {
	_c.Call.Return(run)
	return _c
}

// QueryContext provides a mock function with given fields: ctx, query, args
func (_m *DBer) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error) {
	var _ca []interface{}
	_ca = append(_ca, ctx, query)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for QueryContext")
	}

	var r0 *sql.Rows
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) (*sql.Rows, error)); ok {
		return rf(ctx, query, args...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) *sql.Rows); ok {
		r0 = rf(ctx, query, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sql.Rows)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string, ...interface{}) error); ok {
		r1 = rf(ctx, query, args...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// DBer_QueryContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryContext'
type DBer_QueryContext_Call struct {
	*mock.Call
}

// QueryContext is a helper method to define mock.On call
//   - ctx context.Context
//   - query string
//   - args ...interface{}
func (_e *DBer_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *DBer_QueryContext_Call {
	return &DBer_QueryContext_Call{Call: _e.mock.On("QueryContext",
		append([]interface{}{ctx, query}, args...)...)}
}

func (_c *DBer_QueryContext_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *DBer_QueryContext_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]interface{}, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		run(args[0].(context.Context), args[1].(string), variadicArgs...)
	})
	return _c
}

func (_c *DBer_QueryContext_Call) Return(_a0 *sql.Rows, _a1 error) *DBer_QueryContext_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *DBer_QueryContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (*sql.Rows, error)) *DBer_QueryContext_Call {
	_c.Call.Return(run)
	return _c
}

// QueryRow provides a mock function with given fields: query, args
func (_m *DBer) QueryRow(query string, args ...interface{}) *sql.Row {
	var _ca []interface{}
	_ca = append(_ca, query)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for QueryRow")
	}

	var r0 *sql.Row
	if rf, ok := ret.Get(0).(func(string, ...interface{}) *sql.Row); ok {
		r0 = rf(query, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sql.Row)
		}
	}

	return r0
}

// DBer_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'
type DBer_QueryRow_Call struct {
	*mock.Call
}

// QueryRow is a helper method to define mock.On call
//   - query string
//   - args ...interface{}
func (_e *DBer_Expecter) QueryRow(query interface{}, args ...interface{}) *DBer_QueryRow_Call {
	return &DBer_QueryRow_Call{Call: _e.mock.On("QueryRow",
		append([]interface{}{query}, args...)...)}
}

func (_c *DBer_QueryRow_Call) Run(run func(query string, args ...interface{})) *DBer_QueryRow_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]interface{}, len(args)-1)
		for i, a := range args[1:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		run(args[0].(string), variadicArgs...)
	})
	return _c
}

func (_c *DBer_QueryRow_Call) Return(_a0 *sql.Row) *DBer_QueryRow_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *DBer_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *DBer_QueryRow_Call {
	_c.Call.Return(run)
	return _c
}

// QueryRowContext provides a mock function with given fields: ctx, query, args
func (_m *DBer) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row {
	var _ca []interface{}
	_ca = append(_ca, ctx, query)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for QueryRowContext")
	}

	var r0 *sql.Row
	if rf, ok := ret.Get(0).(func(context.Context, string, ...interface{}) *sql.Row); ok {
		r0 = rf(ctx, query, args...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*sql.Row)
		}
	}

	return r0
}

// DBer_QueryRowContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRowContext'
type DBer_QueryRowContext_Call struct {
	*mock.Call
}

// QueryRowContext is a helper method to define mock.On call
//   - ctx context.Context
//   - query string
//   - args ...interface{}
func (_e *DBer_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *DBer_QueryRowContext_Call {
	return &DBer_QueryRowContext_Call{Call: _e.mock.On("QueryRowContext",
		append([]interface{}{ctx, query}, args...)...)}
}

func (_c *DBer_QueryRowContext_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *DBer_QueryRowContext_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]interface{}, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		run(args[0].(context.Context), args[1].(string), variadicArgs...)
	})
	return _c
}

func (_c *DBer_QueryRowContext_Call) Return(_a0 *sql.Row) *DBer_QueryRowContext_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *DBer_QueryRowContext_Call) RunAndReturn(run func(context.Context, string, ...interface{}) *sql.Row) *DBer_QueryRowContext_Call {
	_c.Call.Return(run)
	return _c
}

// NewDBer creates a new instance of DBer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewDBer(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBer {
	mock := &DBer{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
