// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package exampletable

import (
	"context"

	"github.com/jackc/pgx/v5"
	"github.com/jackc/pgx/v5/pgconn"
	mock "github.com/stretchr/testify/mock"

	_metricotelembedded "go.opentelemetry.io/otel/metric/embedded"
	_traceotelembedded "go.opentelemetry.io/otel/trace/embedded"
)

// NewMockDBTX creates a new instance of MockDBTX. 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 NewMockDBTX(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDBTX {
	mock := &MockDBTX{}
	mock.Mock.Test(t)

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

	return mock
}

// MockDBTX is an autogenerated mock type for the DBTX type
type MockDBTX struct {
	mock.Mock
	_metricotelembedded.Meter
	_metricotelembedded.MeterProvider
	_traceotelembedded.Span
	_traceotelembedded.Tracer
	_traceotelembedded.TracerProvider
	_metricotelembedded.Float64Histogram
}

type MockDBTX_Expecter struct {
	mock *mock.Mock
}

func (_m *MockDBTX) EXPECT() *MockDBTX_Expecter {
	return &MockDBTX_Expecter{mock: &_m.Mock}
}

// Exec provides a mock function for the type MockDBTX
func (_mock *MockDBTX) Exec(context1 context.Context, s string, ifaceVals ...interface{}) (pgconn.CommandTag, error) {
	var _ca []interface{}
	_ca = append(_ca, context1, s)
	_ca = append(_ca, ifaceVals...)
	ret := _mock.Called(_ca...)

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

	var r0 pgconn.CommandTag
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) (pgconn.CommandTag, error)); ok {
		return returnFunc(context1, s, ifaceVals...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) pgconn.CommandTag); ok {
		r0 = returnFunc(context1, s, ifaceVals...)
	} else {
		r0 = ret.Get(0).(pgconn.CommandTag)
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...interface{}) error); ok {
		r1 = returnFunc(context1, s, ifaceVals...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Exec is a helper method to define mock.On call
//   - context1 context.Context
//   - s string
//   - ifaceVals ...interface{}
func (_e *MockDBTX_Expecter) Exec(context1 interface{}, s interface{}, ifaceVals ...interface{}) *MockDBTX_Exec_Call {
	return &MockDBTX_Exec_Call{Call: _e.mock.On("Exec",
		append([]interface{}{context1, s}, ifaceVals...)...)}
}

func (_c *MockDBTX_Exec_Call) Run(run func(context1 context.Context, s string, ifaceVals ...interface{})) *MockDBTX_Exec_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []interface{}
		variadicArgs := make([]interface{}, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *MockDBTX_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *MockDBTX_Exec_Call {
	_c.Call.Return(commandTag, err)
	return _c
}

func (_c *MockDBTX_Exec_Call) RunAndReturn(run func(context1 context.Context, s string, ifaceVals ...interface{}) (pgconn.CommandTag, error)) *MockDBTX_Exec_Call {
	_c.Call.Return(run)
	return _c
}

// Query provides a mock function for the type MockDBTX
func (_mock *MockDBTX) Query(context1 context.Context, s string, ifaceVals ...interface{}) (pgx.Rows, error) {
	var _ca []interface{}
	_ca = append(_ca, context1, s)
	_ca = append(_ca, ifaceVals...)
	ret := _mock.Called(_ca...)

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

	var r0 pgx.Rows
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) (pgx.Rows, error)); ok {
		return returnFunc(context1, s, ifaceVals...)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) pgx.Rows); ok {
		r0 = returnFunc(context1, s, ifaceVals...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(pgx.Rows)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, string, ...interface{}) error); ok {
		r1 = returnFunc(context1, s, ifaceVals...)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Query is a helper method to define mock.On call
//   - context1 context.Context
//   - s string
//   - ifaceVals ...interface{}
func (_e *MockDBTX_Expecter) Query(context1 interface{}, s interface{}, ifaceVals ...interface{}) *MockDBTX_Query_Call {
	return &MockDBTX_Query_Call{Call: _e.mock.On("Query",
		append([]interface{}{context1, s}, ifaceVals...)...)}
}

func (_c *MockDBTX_Query_Call) Run(run func(context1 context.Context, s string, ifaceVals ...interface{})) *MockDBTX_Query_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []interface{}
		variadicArgs := make([]interface{}, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *MockDBTX_Query_Call) Return(rows pgx.Rows, err error) *MockDBTX_Query_Call {
	_c.Call.Return(rows, err)
	return _c
}

func (_c *MockDBTX_Query_Call) RunAndReturn(run func(context1 context.Context, s string, ifaceVals ...interface{}) (pgx.Rows, error)) *MockDBTX_Query_Call {
	_c.Call.Return(run)
	return _c
}

// QueryRow provides a mock function for the type MockDBTX
func (_mock *MockDBTX) QueryRow(context1 context.Context, s string, ifaceVals ...interface{}) pgx.Row {
	var _ca []interface{}
	_ca = append(_ca, context1, s)
	_ca = append(_ca, ifaceVals...)
	ret := _mock.Called(_ca...)

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

	var r0 pgx.Row
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, ...interface{}) pgx.Row); ok {
		r0 = returnFunc(context1, s, ifaceVals...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(pgx.Row)
		}
	}
	return r0
}

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

// QueryRow is a helper method to define mock.On call
//   - context1 context.Context
//   - s string
//   - ifaceVals ...interface{}
func (_e *MockDBTX_Expecter) QueryRow(context1 interface{}, s interface{}, ifaceVals ...interface{}) *MockDBTX_QueryRow_Call {
	return &MockDBTX_QueryRow_Call{Call: _e.mock.On("QueryRow",
		append([]interface{}{context1, s}, ifaceVals...)...)}
}

func (_c *MockDBTX_QueryRow_Call) Run(run func(context1 context.Context, s string, ifaceVals ...interface{})) *MockDBTX_QueryRow_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 []interface{}
		variadicArgs := make([]interface{}, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(interface{})
			}
		}
		arg2 = variadicArgs
		run(
			arg0,
			arg1,
			arg2...,
		)
	})
	return _c
}

func (_c *MockDBTX_QueryRow_Call) Return(row pgx.Row) *MockDBTX_QueryRow_Call {
	_c.Call.Return(row)
	return _c
}

func (_c *MockDBTX_QueryRow_Call) RunAndReturn(run func(context1 context.Context, s string, ifaceVals ...interface{}) pgx.Row) *MockDBTX_QueryRow_Call {
	_c.Call.Return(run)
	return _c
}
