orm

package
v0.0.0-...-d01dfd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator struct {
	mock.Mock
}

Creator is an autogenerated mock type for the Creator type

func NewCreator

func NewCreator(t interface {
	mock.TestingT
	Cleanup(func())
}) *Creator

NewCreator creates a new instance of Creator. 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 (*Creator) Create

func (_m *Creator) Create() orm.Ormer

Create provides a mock function with given fields:

type FakeOrmer

type FakeOrmer struct {
}

FakeOrmer ...

func (*FakeOrmer) Begin

func (f *FakeOrmer) Begin() (orm.TxOrmer, error)

func (*FakeOrmer) BeginTx

func (f *FakeOrmer) BeginTx(ctx context.Context, opts *sql.TxOptions) error

BeginTx ...

func (*FakeOrmer) BeginWithCtx

func (f *FakeOrmer) BeginWithCtx(ctx context.Context) (orm.TxOrmer, error)

func (*FakeOrmer) BeginWithCtxAndOpts

func (f *FakeOrmer) BeginWithCtxAndOpts(ctx context.Context, opts *sql.TxOptions) (orm.TxOrmer, error)

func (*FakeOrmer) BeginWithOpts

func (f *FakeOrmer) BeginWithOpts(opts *sql.TxOptions) (orm.TxOrmer, error)

func (*FakeOrmer) Commit

func (f *FakeOrmer) Commit() error

Commit ...

func (*FakeOrmer) DBStats

func (f *FakeOrmer) DBStats() *sql.DBStats

DBStats ...

func (*FakeOrmer) Delete

func (f *FakeOrmer) Delete(md interface{}, cols ...string) (int64, error)

Delete ...

func (*FakeOrmer) DeleteWithCtx

func (f *FakeOrmer) DeleteWithCtx(ctx context.Context, md interface{}, cols ...string) (int64, error)

func (*FakeOrmer) DoTx

func (f *FakeOrmer) DoTx(task func(ctx context.Context, txOrm orm.TxOrmer) error) error

func (*FakeOrmer) DoTxWithCtx

func (f *FakeOrmer) DoTxWithCtx(ctx context.Context, task func(ctx context.Context, txOrm orm.TxOrmer) error) error

func (*FakeOrmer) DoTxWithCtxAndOpts

func (f *FakeOrmer) DoTxWithCtxAndOpts(ctx context.Context, opts *sql.TxOptions, task func(ctx context.Context, txOrm orm.TxOrmer) error) error

func (*FakeOrmer) DoTxWithOpts

func (f *FakeOrmer) DoTxWithOpts(opts *sql.TxOptions, task func(ctx context.Context, txOrm orm.TxOrmer) error) error

func (*FakeOrmer) Driver

func (f *FakeOrmer) Driver() orm.Driver

Driver ...

func (*FakeOrmer) Insert

func (f *FakeOrmer) Insert(interface{}) (int64, error)

Insert ...

func (*FakeOrmer) InsertMulti

func (f *FakeOrmer) InsertMulti(bulk int, mds interface{}) (int64, error)

InsertMulti ...

func (*FakeOrmer) InsertMultiWithCtx

func (f *FakeOrmer) InsertMultiWithCtx(ctx context.Context, bulk int, mds interface{}) (int64, error)

func (*FakeOrmer) InsertOrUpdate

func (f *FakeOrmer) InsertOrUpdate(md interface{}, colConflitAndArgs ...string) (int64, error)

InsertOrUpdate ...

func (*FakeOrmer) InsertOrUpdateWithCtx

func (f *FakeOrmer) InsertOrUpdateWithCtx(ctx context.Context, md interface{}, colConflitAndArgs ...string) (int64, error)

func (*FakeOrmer) InsertWithCtx

func (f *FakeOrmer) InsertWithCtx(ctx context.Context, md interface{}) (int64, error)

func (*FakeOrmer) LoadRelated

func (f *FakeOrmer) LoadRelated(md interface{}, name string, args ...utils.KV) (int64, error)

func (*FakeOrmer) LoadRelatedWithCtx

func (f *FakeOrmer) LoadRelatedWithCtx(_ context.Context, md interface{}, name string, args ...utils.KV) (int64, error)

func (*FakeOrmer) QueryM2M

func (f *FakeOrmer) QueryM2M(md interface{}, name string) orm.QueryM2Mer

QueryM2M ...

func (*FakeOrmer) QueryM2MWithCtx

func (f *FakeOrmer) QueryM2MWithCtx(ctx context.Context, md interface{}, name string) orm.QueryM2Mer

func (*FakeOrmer) QueryTable

func (f *FakeOrmer) QueryTable(ptrStructOrTableName interface{}) orm.QuerySeter

QueryTable ...

func (*FakeOrmer) QueryTableWithCtx

func (f *FakeOrmer) QueryTableWithCtx(ctx context.Context, ptrStructOrTableName interface{}) orm.QuerySeter

func (*FakeOrmer) Raw

func (f *FakeOrmer) Raw(query string, args ...interface{}) orm.RawSeter

Raw ...

func (*FakeOrmer) RawWithCtx

func (f *FakeOrmer) RawWithCtx(ctx context.Context, query string, args ...interface{}) orm.RawSeter

func (*FakeOrmer) Read

func (f *FakeOrmer) Read(md interface{}, cols ...string) error

Read ...

func (*FakeOrmer) ReadForUpdate

func (f *FakeOrmer) ReadForUpdate(md interface{}, cols ...string) error

ReadForUpdate ...

func (*FakeOrmer) ReadForUpdateWithCtx

func (f *FakeOrmer) ReadForUpdateWithCtx(ctx context.Context, md interface{}, cols ...string) error

func (*FakeOrmer) ReadOrCreate

func (f *FakeOrmer) ReadOrCreate(md interface{}, col1 string, cols ...string) (bool, int64, error)

ReadOrCreate ...

func (*FakeOrmer) ReadOrCreateWithCtx

func (f *FakeOrmer) ReadOrCreateWithCtx(ctx context.Context, md interface{}, col1 string, cols ...string) (bool, int64, error)

func (*FakeOrmer) ReadWithCtx

func (f *FakeOrmer) ReadWithCtx(ctx context.Context, md interface{}, cols ...string) error

func (*FakeOrmer) Rollback

func (f *FakeOrmer) Rollback() error

Rollback ...

func (*FakeOrmer) Update

func (f *FakeOrmer) Update(md interface{}, cols ...string) (int64, error)

Update ...

func (*FakeOrmer) UpdateWithCtx

func (f *FakeOrmer) UpdateWithCtx(ctx context.Context, md interface{}, cols ...string) (int64, error)

func (*FakeOrmer) Using

func (f *FakeOrmer) Using(name string) error

Using ...

type FakeRawSeter

type FakeRawSeter struct {
}

FakeTxOrmer ...

func (FakeRawSeter) Exec

func (f FakeRawSeter) Exec() (sql.Result, error)

func (FakeRawSeter) Prepare

func (f FakeRawSeter) Prepare() (orm.RawPreparer, error)

func (FakeRawSeter) QueryRow

func (f FakeRawSeter) QueryRow(containers ...interface{}) error

func (FakeRawSeter) QueryRows

func (f FakeRawSeter) QueryRows(containers ...interface{}) (int64, error)

func (FakeRawSeter) RowsToMap

func (f FakeRawSeter) RowsToMap(result *orm.Params, keyCol, valueCol string) (int64, error)

func (FakeRawSeter) RowsToStruct

func (f FakeRawSeter) RowsToStruct(ptrStruct interface{}, keyCol, valueCol string) (int64, error)

func (FakeRawSeter) SetArgs

func (f FakeRawSeter) SetArgs(i ...interface{}) orm.RawSeter

func (FakeRawSeter) Values

func (f FakeRawSeter) Values(container *[]orm.Params, cols ...string) (int64, error)

func (FakeRawSeter) ValuesFlat

func (f FakeRawSeter) ValuesFlat(container *orm.ParamsList, cols ...string) (int64, error)

func (FakeRawSeter) ValuesList

func (f FakeRawSeter) ValuesList(container *[]orm.ParamsList, cols ...string) (int64, error)

type FakeTxOrmer

type FakeTxOrmer struct {
}

FakeTxOrmer ...

func (*FakeTxOrmer) Commit

func (f *FakeTxOrmer) Commit() error

func (*FakeTxOrmer) DBStats

func (f *FakeTxOrmer) DBStats() *sql.DBStats

func (*FakeTxOrmer) Delete

func (f *FakeTxOrmer) Delete(md interface{}, cols ...string) (int64, error)

func (*FakeTxOrmer) DeleteWithCtx

func (f *FakeTxOrmer) DeleteWithCtx(ctx context.Context, md interface{}, cols ...string) (int64, error)

func (*FakeTxOrmer) Driver

func (f *FakeTxOrmer) Driver() orm.Driver

func (*FakeTxOrmer) Insert

func (f *FakeTxOrmer) Insert(md interface{}) (int64, error)

func (*FakeTxOrmer) InsertMulti

func (f *FakeTxOrmer) InsertMulti(bulk int, mds interface{}) (int64, error)

func (*FakeTxOrmer) InsertMultiWithCtx

func (f *FakeTxOrmer) InsertMultiWithCtx(ctx context.Context, bulk int, mds interface{}) (int64, error)

func (*FakeTxOrmer) InsertOrUpdate

func (f *FakeTxOrmer) InsertOrUpdate(md interface{}, colConflitAndArgs ...string) (int64, error)

func (*FakeTxOrmer) InsertOrUpdateWithCtx

func (f *FakeTxOrmer) InsertOrUpdateWithCtx(ctx context.Context, md interface{}, colConflitAndArgs ...string) (int64, error)

func (*FakeTxOrmer) InsertWithCtx

func (f *FakeTxOrmer) InsertWithCtx(ctx context.Context, md interface{}) (int64, error)

func (*FakeTxOrmer) LoadRelated

func (f *FakeTxOrmer) LoadRelated(md interface{}, name string, args ...utils.KV) (int64, error)

func (*FakeTxOrmer) LoadRelatedWithCtx

func (f *FakeTxOrmer) LoadRelatedWithCtx(ctx context.Context, md interface{}, name string, args ...utils.KV) (int64, error)

func (*FakeTxOrmer) QueryM2M

func (f *FakeTxOrmer) QueryM2M(md interface{}, name string) orm.QueryM2Mer

func (*FakeTxOrmer) QueryM2MWithCtx

func (f *FakeTxOrmer) QueryM2MWithCtx(ctx context.Context, md interface{}, name string) orm.QueryM2Mer

func (*FakeTxOrmer) QueryTable

func (f *FakeTxOrmer) QueryTable(ptrStructOrTableName interface{}) orm.QuerySeter

func (*FakeTxOrmer) QueryTableWithCtx

func (f *FakeTxOrmer) QueryTableWithCtx(ctx context.Context, ptrStructOrTableName interface{}) orm.QuerySeter

func (*FakeTxOrmer) Raw

func (f *FakeTxOrmer) Raw(query string, args ...interface{}) orm.RawSeter

func (*FakeTxOrmer) RawWithCtx

func (f *FakeTxOrmer) RawWithCtx(ctx context.Context, query string, args ...interface{}) orm.RawSeter

func (*FakeTxOrmer) Read

func (f *FakeTxOrmer) Read(md interface{}, cols ...string) error

func (*FakeTxOrmer) ReadForUpdate

func (f *FakeTxOrmer) ReadForUpdate(md interface{}, cols ...string) error

func (*FakeTxOrmer) ReadForUpdateWithCtx

func (f *FakeTxOrmer) ReadForUpdateWithCtx(ctx context.Context, md interface{}, cols ...string) error

func (*FakeTxOrmer) ReadOrCreate

func (f *FakeTxOrmer) ReadOrCreate(md interface{}, col1 string, cols ...string) (bool, int64, error)

func (*FakeTxOrmer) ReadOrCreateWithCtx

func (f *FakeTxOrmer) ReadOrCreateWithCtx(ctx context.Context, md interface{}, col1 string, cols ...string) (bool, int64, error)

func (*FakeTxOrmer) ReadWithCtx

func (f *FakeTxOrmer) ReadWithCtx(ctx context.Context, md interface{}, cols ...string) error

func (*FakeTxOrmer) Rollback

func (f *FakeTxOrmer) Rollback() error

func (*FakeTxOrmer) RollbackUnlessCommit

func (f *FakeTxOrmer) RollbackUnlessCommit() error

func (*FakeTxOrmer) Update

func (f *FakeTxOrmer) Update(md interface{}, cols ...string) (int64, error)

func (*FakeTxOrmer) UpdateWithCtx

func (f *FakeTxOrmer) UpdateWithCtx(ctx context.Context, md interface{}, cols ...string) (int64, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL