// Code generated by mockery v1.1.2. DO NOT EDIT.

package mock

import (
	context "context"

	record "github.com/appist/appy/record"
	mock "github.com/stretchr/testify/mock"

	sql "database/sql"
)

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

// Commit provides a mock function with given fields:
func (_m *Tx) Commit() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

	var r0 sql.Result
	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)
		}
	}

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

	return r0, r1
}

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

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

	var r1 error
	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
}

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

	var r0 error
	if rf, ok := ret.Get(0).(func(interface{}, string, ...interface{}) error); ok {
		r0 = rf(dest, query, args...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

	return r0
}

// NamedExec provides a mock function with given fields: query, arg
func (_m *Tx) NamedExec(query string, arg interface{}) (sql.Result, error) {
	ret := _m.Called(query, arg)

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

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

	return r0, r1
}

// NamedExecContext provides a mock function with given fields: ctx, query, arg
func (_m *Tx) NamedExecContext(ctx context.Context, query string, arg interface{}) (sql.Result, error) {
	ret := _m.Called(ctx, query, arg)

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

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

	return r0, r1
}

// NamedQuery provides a mock function with given fields: query, arg
func (_m *Tx) NamedQuery(query string, arg interface{}) (*record.Rows, error) {
	ret := _m.Called(query, arg)

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

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

	return r0, r1
}

// NamedQueryContext provides a mock function with given fields: ctx, query, arg
func (_m *Tx) NamedQueryContext(ctx context.Context, query string, arg interface{}) (*record.Rows, error) {
	ret := _m.Called(ctx, query, arg)

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

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

	return r0, r1
}

// Prepare provides a mock function with given fields: query
func (_m *Tx) Prepare(query string) (*record.Stmt, error) {
	ret := _m.Called(query)

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

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

	return r0, r1
}

// PrepareContext provides a mock function with given fields: ctx, query
func (_m *Tx) PrepareContext(ctx context.Context, query string) (*record.Stmt, error) {
	ret := _m.Called(ctx, query)

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

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

	return r0, r1
}

// PrepareNamed provides a mock function with given fields: query
func (_m *Tx) PrepareNamed(query string) (*record.NamedStmt, error) {
	ret := _m.Called(query)

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

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

	return r0, r1
}

// PrepareNamedContext provides a mock function with given fields: ctx, query
func (_m *Tx) PrepareNamedContext(ctx context.Context, query string) (*record.NamedStmt, error) {
	ret := _m.Called(ctx, query)

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

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

	return r0, r1
}

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

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

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

	return r0, r1
}

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

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

	var r1 error
	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
}

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

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

	return r0
}

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

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

	return r0
}

// Rollback provides a mock function with given fields:
func (_m *Tx) Rollback() error {
	ret := _m.Called()

	var r0 error
	if rf, ok := ret.Get(0).(func() error); ok {
		r0 = rf()
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

	var r0 error
	if rf, ok := ret.Get(0).(func(interface{}, string, ...interface{}) error); ok {
		r0 = rf(dest, query, args...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

	return r0
}

// Stmt provides a mock function with given fields: stmt
func (_m *Tx) Stmt(stmt *record.Stmt) *record.Stmt {
	ret := _m.Called(stmt)

	var r0 *record.Stmt
	if rf, ok := ret.Get(0).(func(*record.Stmt) *record.Stmt); ok {
		r0 = rf(stmt)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*record.Stmt)
		}
	}

	return r0
}

// StmtContext provides a mock function with given fields: ctx, stmt
func (_m *Tx) StmtContext(ctx context.Context, stmt *record.Stmt) *record.Stmt {
	ret := _m.Called(ctx, stmt)

	var r0 *record.Stmt
	if rf, ok := ret.Get(0).(func(context.Context, *record.Stmt) *record.Stmt); ok {
		r0 = rf(ctx, stmt)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*record.Stmt)
		}
	}

	return r0
}
