package
0.0.2
Repository: https://github.com/env-io/orm.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
MockCommit support Commit.
MockDBStats support DBStats.
MockDeleteWithCtx support Delete and DeleteWithCtx.
MockInsertMultiWithCtx support InsertMulti and InsertMultiWithCtx.
MockInsertOrUpdateWithCtx support InsertOrUpdate and InsertOrUpdateWithCtx.
MockInsertWithCtx support Insert and InsertWithCtx.
MockLoadRelatedWithCtx support LoadRelatedWithCtx and LoadRelated.
MockMethod only check method name.
MockQueryM2MWithCtx support QueryM2MWithCtx and QueryM2M Now you may be need to use golang/mock to generate QueryM2M mock instance Or use DoNothingQueryM2Mer for example: post := Post{Id: 4} m2m := Ormer.QueryM2M(&post, "Tags") when you write test code: MockQueryM2MWithCtx("post", "Tags", mockM2Mer) "post" is the table name of model Post structure TODO provide orm.QueryM2Mer.
MockQueryTableWithCtx support QueryTableWithCtx and QueryTable.
MockRawWithCtx support RawWithCtx and Raw.
MockOrmRead support orm.Read and orm.ReadWithCtx cb is used to mock read data from DB.
MockReadForUpdateWithCtx support ReadForUpdate and ReadForUpdateWithCtx cb is used to mock read data from DB.
MockReadOrCreateWithCtx support ReadOrCreate and ReadOrCreateWithCtx cb is used to mock read data from DB.
MockRollback support Rollback.
MockRollbackUnlessCommit support RollbackUnlessCommit.
MockTable only check table name.
MockUpdateWithCtx support UpdateWithCtx and Update.
No description provided by the author
No description provided by the author
No description provided by the author
RegisterMockDB create an "virtual DB" by using sqllite you should not.
No description provided by the author

# Structs

DoNothingQueryM2Mer do nothing use it to build mock orm.QueryM2Mer.
DoNothingQuerySetter do nothing usually you use this to build your mock QuerySetter.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author