Documentation ¶
Index ¶
- type Association
- func (_m *Association) Append(values ...interface{}) error
- func (_m *Association) Clear() error
- func (_m *Association) Count() int64
- func (_m *Association) Delete(values ...interface{}) error
- func (_m *Association) Find(out interface{}, conds ...interface{}) error
- func (_m *Association) Replace(values ...interface{}) error
- type Cursor
- type Factory
- func (_m *Factory) Count(count int) orm.Factory
- func (_m *Factory) Create(value interface{}, attributes ...map[string]interface{}) error
- func (_m *Factory) CreateQuietly(value interface{}, attributes ...map[string]interface{}) error
- func (_m *Factory) Make(value interface{}, attributes ...map[string]interface{}) error
- type Orm
- func (_m *Orm) Connection(name string) orm.Orm
- func (_m *Orm) DB() (*sql.DB, error)
- func (_m *Orm) Factory() orm.Factory
- func (_m *Orm) Observe(model interface{}, observer orm.Observer)
- func (_m *Orm) Query() orm.Query
- func (_m *Orm) Transaction(txFunc func(orm.Transaction) error) error
- func (_m *Orm) WithContext(ctx context.Context) orm.Orm
- type Query
- func (_m *Query) Association(association string) orm.Association
- func (_m *Query) Begin() (orm.Transaction, error)
- func (_m *Query) Count(count *int64) error
- func (_m *Query) Create(value interface{}) error
- func (_m *Query) Cursor() (chan orm.Cursor, error)
- func (_m *Query) Delete(value interface{}, conds ...interface{}) (*orm.Result, error)
- func (_m *Query) Distinct(args ...interface{}) orm.Query
- func (_m *Query) Driver() orm.Driver
- func (_m *Query) Exec(sql string, values ...interface{}) (*orm.Result, error)
- func (_m *Query) Find(dest interface{}, conds ...interface{}) error
- func (_m *Query) FindOrFail(dest interface{}, conds ...interface{}) error
- func (_m *Query) First(dest interface{}) error
- func (_m *Query) FirstOr(dest interface{}, callback func() error) error
- func (_m *Query) FirstOrCreate(dest interface{}, conds ...interface{}) error
- func (_m *Query) FirstOrFail(dest interface{}) error
- func (_m *Query) FirstOrNew(dest interface{}, attributes interface{}, values ...interface{}) error
- func (_m *Query) ForceDelete(value interface{}, conds ...interface{}) (*orm.Result, error)
- func (_m *Query) Get(dest interface{}) error
- func (_m *Query) Group(name string) orm.Query
- func (_m *Query) Having(query interface{}, args ...interface{}) orm.Query
- func (_m *Query) Join(query string, args ...interface{}) orm.Query
- func (_m *Query) Limit(limit int) orm.Query
- func (_m *Query) Load(dest interface{}, relation string, args ...interface{}) error
- func (_m *Query) LoadMissing(dest interface{}, relation string, args ...interface{}) error
- func (_m *Query) LockForUpdate() orm.Query
- func (_m *Query) Model(value interface{}) orm.Query
- func (_m *Query) Offset(offset int) orm.Query
- func (_m *Query) Omit(columns ...string) orm.Query
- func (_m *Query) OrWhere(query interface{}, args ...interface{}) orm.Query
- func (_m *Query) Order(value interface{}) orm.Query
- func (_m *Query) Paginate(page int, limit int, dest interface{}, total *int64) error
- func (_m *Query) Pluck(column string, dest interface{}) error
- func (_m *Query) Raw(sql string, values ...interface{}) orm.Query
- func (_m *Query) Save(value interface{}) error
- func (_m *Query) SaveQuietly(value interface{}) error
- func (_m *Query) Scan(dest interface{}) error
- func (_m *Query) Scopes(funcs ...func(orm.Query) orm.Query) orm.Query
- func (_m *Query) Select(query interface{}, args ...interface{}) orm.Query
- func (_m *Query) SharedLock() orm.Query
- func (_m *Query) Sum(column string, dest interface{}) error
- func (_m *Query) Table(name string, args ...interface{}) orm.Query
- func (_m *Query) Update(column interface{}, value ...interface{}) (*orm.Result, error)
- func (_m *Query) UpdateOrCreate(dest interface{}, attributes interface{}, values interface{}) error
- func (_m *Query) Where(query interface{}, args ...interface{}) orm.Query
- func (_m *Query) With(query string, args ...interface{}) orm.Query
- func (_m *Query) WithTrashed() orm.Query
- func (_m *Query) WithoutEvents() orm.Query
- type Transaction
- func (_m *Transaction) Association(association string) orm.Association
- func (_m *Transaction) Begin() (orm.Transaction, error)
- func (_m *Transaction) Commit() error
- func (_m *Transaction) Count(count *int64) error
- func (_m *Transaction) Create(value interface{}) error
- func (_m *Transaction) Cursor() (chan orm.Cursor, error)
- func (_m *Transaction) Delete(value interface{}, conds ...interface{}) (*orm.Result, error)
- func (_m *Transaction) Distinct(args ...interface{}) orm.Query
- func (_m *Transaction) Driver() orm.Driver
- func (_m *Transaction) Exec(sql string, values ...interface{}) (*orm.Result, error)
- func (_m *Transaction) Find(dest interface{}, conds ...interface{}) error
- func (_m *Transaction) FindOrFail(dest interface{}, conds ...interface{}) error
- func (_m *Transaction) First(dest interface{}) error
- func (_m *Transaction) FirstOr(dest interface{}, callback func() error) error
- func (_m *Transaction) FirstOrCreate(dest interface{}, conds ...interface{}) error
- func (_m *Transaction) FirstOrFail(dest interface{}) error
- func (_m *Transaction) FirstOrNew(dest interface{}, attributes interface{}, values ...interface{}) error
- func (_m *Transaction) ForceDelete(value interface{}, conds ...interface{}) (*orm.Result, error)
- func (_m *Transaction) Get(dest interface{}) error
- func (_m *Transaction) Group(name string) orm.Query
- func (_m *Transaction) Having(query interface{}, args ...interface{}) orm.Query
- func (_m *Transaction) Join(query string, args ...interface{}) orm.Query
- func (_m *Transaction) Limit(limit int) orm.Query
- func (_m *Transaction) Load(dest interface{}, relation string, args ...interface{}) error
- func (_m *Transaction) LoadMissing(dest interface{}, relation string, args ...interface{}) error
- func (_m *Transaction) LockForUpdate() orm.Query
- func (_m *Transaction) Model(value interface{}) orm.Query
- func (_m *Transaction) Offset(offset int) orm.Query
- func (_m *Transaction) Omit(columns ...string) orm.Query
- func (_m *Transaction) OrWhere(query interface{}, args ...interface{}) orm.Query
- func (_m *Transaction) Order(value interface{}) orm.Query
- func (_m *Transaction) Paginate(page int, limit int, dest interface{}, total *int64) error
- func (_m *Transaction) Pluck(column string, dest interface{}) error
- func (_m *Transaction) Raw(sql string, values ...interface{}) orm.Query
- func (_m *Transaction) Rollback() error
- func (_m *Transaction) Save(value interface{}) error
- func (_m *Transaction) SaveQuietly(value interface{}) error
- func (_m *Transaction) Scan(dest interface{}) error
- func (_m *Transaction) Scopes(funcs ...func(orm.Query) orm.Query) orm.Query
- func (_m *Transaction) Select(query interface{}, args ...interface{}) orm.Query
- func (_m *Transaction) SharedLock() orm.Query
- func (_m *Transaction) Sum(column string, dest interface{}) error
- func (_m *Transaction) Table(name string, args ...interface{}) orm.Query
- func (_m *Transaction) Update(column interface{}, value ...interface{}) (*orm.Result, error)
- func (_m *Transaction) UpdateOrCreate(dest interface{}, attributes interface{}, values interface{}) error
- func (_m *Transaction) Where(query interface{}, args ...interface{}) orm.Query
- func (_m *Transaction) With(query string, args ...interface{}) orm.Query
- func (_m *Transaction) WithTrashed() orm.Query
- func (_m *Transaction) WithoutEvents() orm.Query
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Association ¶ added in v1.8.0
Association is an autogenerated mock type for the Association type
func NewAssociation ¶ added in v1.8.0
func NewAssociation(t interface { mock.TestingT Cleanup(func()) }) *Association
NewAssociation creates a new instance of Association. 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 (*Association) Append ¶ added in v1.8.0
func (_m *Association) Append(values ...interface{}) error
Append provides a mock function with given fields: values
func (*Association) Clear ¶ added in v1.8.0
func (_m *Association) Clear() error
Clear provides a mock function with given fields:
func (*Association) Count ¶ added in v1.8.0
func (_m *Association) Count() int64
Count provides a mock function with given fields:
func (*Association) Delete ¶ added in v1.8.0
func (_m *Association) Delete(values ...interface{}) error
Delete provides a mock function with given fields: values
func (*Association) Find ¶ added in v1.8.0
func (_m *Association) Find(out interface{}, conds ...interface{}) error
Find provides a mock function with given fields: out, conds
func (*Association) Replace ¶ added in v1.8.0
func (_m *Association) Replace(values ...interface{}) error
Replace provides a mock function with given fields: values
type Cursor ¶ added in v1.13.0
Cursor is an autogenerated mock type for the Cursor type
type Factory ¶ added in v1.13.0
Factory is an autogenerated mock type for the Factory type
func NewFactory ¶ added in v1.13.0
func NewFactory(t mockConstructorTestingTNewFactory) *Factory
NewFactory creates a new instance of Factory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Factory) Create ¶ added in v1.13.0
Create provides a mock function with given fields: value, attributes
func (*Factory) CreateQuietly ¶ added in v1.13.0
CreateQuietly provides a mock function with given fields: value, attributes
type Orm ¶
Orm is an autogenerated mock type for the Orm type
func NewOrm ¶
NewOrm creates a new instance of Orm. 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 (*Orm) Connection ¶
Connection provides a mock function with given fields: name
func (*Orm) Observe ¶ added in v1.11.0
Observe provides a mock function with given fields: model, observer
func (*Orm) Transaction ¶
func (_m *Orm) Transaction(txFunc func(orm.Transaction) error) error
Transaction provides a mock function with given fields: txFunc
type Query ¶ added in v1.10.0
Query is an autogenerated mock type for the Query type
func NewQuery ¶ added in v1.10.0
NewQuery creates a new instance of Query. 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 (*Query) Association ¶ added in v1.10.0
func (_m *Query) Association(association string) orm.Association
Association provides a mock function with given fields: association
func (*Query) Begin ¶ added in v1.10.0
func (_m *Query) Begin() (orm.Transaction, error)
Begin provides a mock function with given fields:
func (*Query) Delete ¶ added in v1.10.0
Delete provides a mock function with given fields: value, conds
func (*Query) FindOrFail ¶ added in v1.11.0
FindOrFail provides a mock function with given fields: dest, conds
func (*Query) FirstOr ¶ added in v1.10.0
FirstOr provides a mock function with given fields: dest, callback
func (*Query) FirstOrCreate ¶ added in v1.10.0
FirstOrCreate provides a mock function with given fields: dest, conds
func (*Query) FirstOrFail ¶ added in v1.10.0
FirstOrFail provides a mock function with given fields: dest
func (*Query) FirstOrNew ¶ added in v1.10.0
FirstOrNew provides a mock function with given fields: dest, attributes, values
func (*Query) ForceDelete ¶ added in v1.10.0
ForceDelete provides a mock function with given fields: value, conds
func (*Query) Having ¶ added in v1.10.0
Having provides a mock function with given fields: query, args
func (*Query) Load ¶ added in v1.10.0
Load provides a mock function with given fields: dest, relation, args
func (*Query) LoadMissing ¶ added in v1.10.0
LoadMissing provides a mock function with given fields: dest, relation, args
func (*Query) LockForUpdate ¶ added in v1.11.0
LockForUpdate provides a mock function with given fields:
func (*Query) OrWhere ¶ added in v1.10.0
OrWhere provides a mock function with given fields: query, args
func (*Query) Paginate ¶ added in v1.10.0
Paginate provides a mock function with given fields: page, limit, dest, total
func (*Query) Pluck ¶ added in v1.10.0
Pluck provides a mock function with given fields: column, dest
func (*Query) SaveQuietly ¶ added in v1.11.0
SaveQuietly provides a mock function with given fields: value
func (*Query) Select ¶ added in v1.10.0
Select provides a mock function with given fields: query, args
func (*Query) SharedLock ¶ added in v1.11.0
SharedLock provides a mock function with given fields:
func (*Query) Update ¶ added in v1.10.0
Update provides a mock function with given fields: column, value
func (*Query) UpdateOrCreate ¶ added in v1.10.0
UpdateOrCreate provides a mock function with given fields: dest, attributes, values
func (*Query) Where ¶ added in v1.10.0
Where provides a mock function with given fields: query, args
func (*Query) WithTrashed ¶ added in v1.10.0
WithTrashed provides a mock function with given fields:
func (*Query) WithoutEvents ¶ added in v1.11.0
WithoutEvents provides a mock function with given fields:
type Transaction ¶
Transaction is an autogenerated mock type for the Transaction type
func NewTransaction ¶
func NewTransaction(t interface { mock.TestingT Cleanup(func()) }) *Transaction
NewTransaction creates a new instance of Transaction. 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 (*Transaction) Association ¶ added in v1.8.0
func (_m *Transaction) Association(association string) orm.Association
Association provides a mock function with given fields: association
func (*Transaction) Begin ¶ added in v1.10.0
func (_m *Transaction) Begin() (orm.Transaction, error)
Begin provides a mock function with given fields:
func (*Transaction) Commit ¶
func (_m *Transaction) Commit() error
Commit provides a mock function with given fields:
func (*Transaction) Count ¶
func (_m *Transaction) Count(count *int64) error
Count provides a mock function with given fields: count
func (*Transaction) Create ¶
func (_m *Transaction) Create(value interface{}) error
Create provides a mock function with given fields: value
func (*Transaction) Cursor ¶ added in v1.13.1
func (_m *Transaction) Cursor() (chan orm.Cursor, error)
Cursor provides a mock function with given fields:
func (*Transaction) Delete ¶
func (_m *Transaction) Delete(value interface{}, conds ...interface{}) (*orm.Result, error)
Delete provides a mock function with given fields: value, conds
func (*Transaction) Distinct ¶ added in v1.0.5
func (_m *Transaction) Distinct(args ...interface{}) orm.Query
Distinct provides a mock function with given fields: args
func (*Transaction) Driver ¶ added in v1.2.3
func (_m *Transaction) Driver() orm.Driver
Driver provides a mock function with given fields:
func (*Transaction) Exec ¶
func (_m *Transaction) Exec(sql string, values ...interface{}) (*orm.Result, error)
Exec provides a mock function with given fields: sql, values
func (*Transaction) Find ¶
func (_m *Transaction) Find(dest interface{}, conds ...interface{}) error
Find provides a mock function with given fields: dest, conds
func (*Transaction) FindOrFail ¶ added in v1.11.0
func (_m *Transaction) FindOrFail(dest interface{}, conds ...interface{}) error
FindOrFail provides a mock function with given fields: dest, conds
func (*Transaction) First ¶
func (_m *Transaction) First(dest interface{}) error
First provides a mock function with given fields: dest
func (*Transaction) FirstOr ¶ added in v1.10.0
func (_m *Transaction) FirstOr(dest interface{}, callback func() error) error
FirstOr provides a mock function with given fields: dest, callback
func (*Transaction) FirstOrCreate ¶
func (_m *Transaction) FirstOrCreate(dest interface{}, conds ...interface{}) error
FirstOrCreate provides a mock function with given fields: dest, conds
func (*Transaction) FirstOrFail ¶ added in v1.10.0
func (_m *Transaction) FirstOrFail(dest interface{}) error
FirstOrFail provides a mock function with given fields: dest
func (*Transaction) FirstOrNew ¶ added in v1.10.0
func (_m *Transaction) FirstOrNew(dest interface{}, attributes interface{}, values ...interface{}) error
FirstOrNew provides a mock function with given fields: dest, attributes, values
func (*Transaction) ForceDelete ¶
func (_m *Transaction) ForceDelete(value interface{}, conds ...interface{}) (*orm.Result, error)
ForceDelete provides a mock function with given fields: value, conds
func (*Transaction) Get ¶
func (_m *Transaction) Get(dest interface{}) error
Get provides a mock function with given fields: dest
func (*Transaction) Group ¶
func (_m *Transaction) Group(name string) orm.Query
Group provides a mock function with given fields: name
func (*Transaction) Having ¶
func (_m *Transaction) Having(query interface{}, args ...interface{}) orm.Query
Having provides a mock function with given fields: query, args
func (*Transaction) Join ¶
func (_m *Transaction) Join(query string, args ...interface{}) orm.Query
Join provides a mock function with given fields: query, args
func (*Transaction) Limit ¶
func (_m *Transaction) Limit(limit int) orm.Query
Limit provides a mock function with given fields: limit
func (*Transaction) Load ¶ added in v1.8.0
func (_m *Transaction) Load(dest interface{}, relation string, args ...interface{}) error
Load provides a mock function with given fields: dest, relation, args
func (*Transaction) LoadMissing ¶ added in v1.8.0
func (_m *Transaction) LoadMissing(dest interface{}, relation string, args ...interface{}) error
LoadMissing provides a mock function with given fields: dest, relation, args
func (*Transaction) LockForUpdate ¶ added in v1.11.0
func (_m *Transaction) LockForUpdate() orm.Query
LockForUpdate provides a mock function with given fields:
func (*Transaction) Model ¶
func (_m *Transaction) Model(value interface{}) orm.Query
Model provides a mock function with given fields: value
func (*Transaction) Offset ¶
func (_m *Transaction) Offset(offset int) orm.Query
Offset provides a mock function with given fields: offset
func (*Transaction) Omit ¶ added in v1.8.0
func (_m *Transaction) Omit(columns ...string) orm.Query
Omit provides a mock function with given fields: columns
func (*Transaction) OrWhere ¶
func (_m *Transaction) OrWhere(query interface{}, args ...interface{}) orm.Query
OrWhere provides a mock function with given fields: query, args
func (*Transaction) Order ¶
func (_m *Transaction) Order(value interface{}) orm.Query
Order provides a mock function with given fields: value
func (*Transaction) Paginate ¶ added in v1.9.0
func (_m *Transaction) Paginate(page int, limit int, dest interface{}, total *int64) error
Paginate provides a mock function with given fields: page, limit, dest, total
func (*Transaction) Pluck ¶
func (_m *Transaction) Pluck(column string, dest interface{}) error
Pluck provides a mock function with given fields: column, dest
func (*Transaction) Raw ¶
func (_m *Transaction) Raw(sql string, values ...interface{}) orm.Query
Raw provides a mock function with given fields: sql, values
func (*Transaction) Rollback ¶
func (_m *Transaction) Rollback() error
Rollback provides a mock function with given fields:
func (*Transaction) Save ¶
func (_m *Transaction) Save(value interface{}) error
Save provides a mock function with given fields: value
func (*Transaction) SaveQuietly ¶ added in v1.11.0
func (_m *Transaction) SaveQuietly(value interface{}) error
SaveQuietly provides a mock function with given fields: value
func (*Transaction) Scan ¶
func (_m *Transaction) Scan(dest interface{}) error
Scan provides a mock function with given fields: dest
func (*Transaction) Select ¶
func (_m *Transaction) Select(query interface{}, args ...interface{}) orm.Query
Select provides a mock function with given fields: query, args
func (*Transaction) SharedLock ¶ added in v1.11.0
func (_m *Transaction) SharedLock() orm.Query
SharedLock provides a mock function with given fields:
func (*Transaction) Sum ¶ added in v1.13.1
func (_m *Transaction) Sum(column string, dest interface{}) error
Sum provides a mock function with given fields: column, dest
func (*Transaction) Table ¶
func (_m *Transaction) Table(name string, args ...interface{}) orm.Query
Table provides a mock function with given fields: name, args
func (*Transaction) Update ¶
func (_m *Transaction) Update(column interface{}, value ...interface{}) (*orm.Result, error)
Update provides a mock function with given fields: column, value
func (*Transaction) UpdateOrCreate ¶ added in v1.10.0
func (_m *Transaction) UpdateOrCreate(dest interface{}, attributes interface{}, values interface{}) error
UpdateOrCreate provides a mock function with given fields: dest, attributes, values
func (*Transaction) Where ¶
func (_m *Transaction) Where(query interface{}, args ...interface{}) orm.Query
Where provides a mock function with given fields: query, args
func (*Transaction) With ¶ added in v1.8.0
func (_m *Transaction) With(query string, args ...interface{}) orm.Query
With provides a mock function with given fields: query, args
func (*Transaction) WithTrashed ¶
func (_m *Transaction) WithTrashed() orm.Query
WithTrashed provides a mock function with given fields:
func (*Transaction) WithoutEvents ¶ added in v1.11.0
func (_m *Transaction) WithoutEvents() orm.Query
WithoutEvents provides a mock function with given fields: