// 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"
)

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

// All provides a mock function with given fields:
func (_m *Model) All() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// AttrByDBColumn provides a mock function with given fields: dbColumn
func (_m *Model) AttrByDBColumn(dbColumn string) *record.ModelAttr {
	ret := _m.Called(dbColumn)

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

	return r0
}

// Begin provides a mock function with given fields:
func (_m *Model) Begin() 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
}

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

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

	return r0
}

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

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

	return r0
}

// Count provides a mock function with given fields:
func (_m *Model) Count() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// Create provides a mock function with given fields:
func (_m *Model) Create() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// Delete provides a mock function with given fields:
func (_m *Model) Delete() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// DeleteAll provides a mock function with given fields:
func (_m *Model) DeleteAll() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// Exec provides a mock function with given fields: opts
func (_m *Model) Exec(opts ...record.ExecOption) (int64, []error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	var r0 int64
	if rf, ok := ret.Get(0).(func(...record.ExecOption) int64); ok {
		r0 = rf(opts...)
	} else {
		r0 = ret.Get(0).(int64)
	}

	var r1 []error
	if rf, ok := ret.Get(1).(func(...record.ExecOption) []error); ok {
		r1 = rf(opts...)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).([]error)
		}
	}

	return r0, r1
}

// Find provides a mock function with given fields:
func (_m *Model) Find() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// Group provides a mock function with given fields: group
func (_m *Model) Group(group string) record.Modeler {
	ret := _m.Called(group)

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

	return r0
}

// Having provides a mock function with given fields: having, args
func (_m *Model) Having(having string, args ...interface{}) record.Modeler {
	var _ca []interface{}
	_ca = append(_ca, having)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

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

	return r0
}

// Join provides a mock function with given fields: join, args
func (_m *Model) Join(join string, args ...interface{}) record.Modeler {
	var _ca []interface{}
	_ca = append(_ca, join)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

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

	return r0
}

// Limit provides a mock function with given fields: limit
func (_m *Model) Limit(limit int) record.Modeler {
	ret := _m.Called(limit)

	var r0 record.Modeler
	if rf, ok := ret.Get(0).(func(int) record.Modeler); ok {
		r0 = rf(limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(record.Modeler)
		}
	}

	return r0
}

// Offset provides a mock function with given fields: offset
func (_m *Model) Offset(offset int) record.Modeler {
	ret := _m.Called(offset)

	var r0 record.Modeler
	if rf, ok := ret.Get(0).(func(int) record.Modeler); ok {
		r0 = rf(offset)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(record.Modeler)
		}
	}

	return r0
}

// Order provides a mock function with given fields: order
func (_m *Model) Order(order string) record.Modeler {
	ret := _m.Called(order)

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

	return r0
}

// PrimaryKeys provides a mock function with given fields:
func (_m *Model) PrimaryKeys() []string {
	ret := _m.Called()

	var r0 []string
	if rf, ok := ret.Get(0).(func() []string); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]string)
		}
	}

	return r0
}

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

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

	return r0
}

// SQL provides a mock function with given fields:
func (_m *Model) SQL() string {
	ret := _m.Called()

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

	return r0
}

// Scan provides a mock function with given fields: dest
func (_m *Model) Scan(dest interface{}) record.Modeler {
	ret := _m.Called(dest)

	var r0 record.Modeler
	if rf, ok := ret.Get(0).(func(interface{}) record.Modeler); ok {
		r0 = rf(dest)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(record.Modeler)
		}
	}

	return r0
}

// Select provides a mock function with given fields: columns
func (_m *Model) Select(columns string) record.Modeler {
	ret := _m.Called(columns)

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

	return r0
}

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

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

	return r0
}

// Update provides a mock function with given fields:
func (_m *Model) Update() record.Modeler {
	ret := _m.Called()

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

	return r0
}

// UpdateAll provides a mock function with given fields: set, args
func (_m *Model) UpdateAll(set string, args ...interface{}) record.Modeler {
	var _ca []interface{}
	_ca = append(_ca, set)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

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

	return r0
}

// Where provides a mock function with given fields: condition, args
func (_m *Model) Where(condition string, args ...interface{}) record.Modeler {
	var _ca []interface{}
	_ca = append(_ca, condition)
	_ca = append(_ca, args...)
	ret := _m.Called(_ca...)

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

	return r0
}
