Documentation ¶
Index ¶
- Variables
- type Logger
- type MockGORM
- func (m *MockGORM) DoRecord(db *gorm.DB)
- func (m *MockGORM) DumpRecorderInfo() map[string][]string
- func (m *MockGORM) GetDBUtil() *util.DBUtil
- func (m *MockGORM) GetDSN() (dbType string, dsn string)
- func (m *MockGORM) GetGormDB() *gorm.DB
- func (m *MockGORM) GetSqlDB() *sql.DB
- func (m *MockGORM) InitSchemas(sqlSchema string)
- func (m *MockGORM) RegisterModels(models ...interface{})
- func (m *MockGORM) ResetAndInit()
- func (m *MockGORM) SaveRecordToFile(dir string)
- func (m *MockGORM) SaveRecordToFileAuto(dir string)
- type MockGORMV2
- func (m *MockGORMV2) DoRecord(db *gorm.DB)
- func (m *MockGORMV2) DumpRecorderInfo() map[string][]string
- func (m *MockGORMV2) GetDBUtil() *util.DBUtil
- func (m *MockGORMV2) GetDSN() (dbType string, dsn string)
- func (m *MockGORMV2) GetGormDB() *gorm.DB
- func (m *MockGORMV2) GetSqlDB() *sql.DB
- func (m *MockGORMV2) InitSchemas(sqlSchema string)
- func (m *MockGORMV2) RegisterModels(models ...interface{})
- func (m *MockGORMV2) ResetAndInit()
- func (m *MockGORMV2) SaveRecordToFile(dir string)
- func (m *MockGORMV2) SaveRecordToFileAuto(dir string)
- type MockXORM
- func (m *MockXORM) DoRecord(scope *xorm.Engine)
- func (m *MockXORM) DumpRecorderInfo() map[string][]string
- func (m *MockXORM) GetDBUtil() *util.DBUtil
- func (m *MockXORM) GetDSN() (dbType string, dsn string)
- func (m *MockXORM) GetSqlDB() *sql.DB
- func (m *MockXORM) GetXORMEngine() *xorm.Engine
- func (m *MockXORM) InitSchemas(sqlSchema string)
- func (m *MockXORM) RegisterModels(models ...interface{})
- func (m *MockXORM) ResetAndInit()
- func (m *MockXORM) SaveRecordToFile(dir string)
- func (m *MockXORM) SaveRecordToFileAuto(dir string)
- type MockZORM
- func (m *MockZORM) GetDBDao() *zorm.DBDao
- func (m *MockZORM) GetDBUtil() *util.DBUtil
- func (m *MockZORM) GetDSN() (dbType string, dsn string)
- func (m *MockZORM) GetSqlDB() *sql.DB
- func (m *MockZORM) InitSchemas(sqlSchema string)
- func (m *MockZORM) RegisterModels(models ...interface{})
- func (m *MockZORM) ResetAndInit()
Constants ¶
This section is empty.
Variables ¶
View Source
var DBType string = "sqlite3"
Functions ¶
This section is empty.
Types ¶
type MockGORM ¶
type MockGORM struct {
// contains filtered or unexported fields
}
func NewGORMFromDSN ¶
func NewMockGORM ¶
func (*MockGORM) DumpRecorderInfo ¶
func (*MockGORM) InitSchemas ¶
InitSchemas 为了兼容github.com/jinzhu/gorm mysql的bug 特殊处理的
func (*MockGORM) RegisterModels ¶
func (m *MockGORM) RegisterModels(models ...interface{})
RegisterModels 注册模型
func (*MockGORM) SaveRecordToFile ¶
func (*MockGORM) SaveRecordToFileAuto ¶ added in v1.3.0
type MockGORMV2 ¶
type MockGORMV2 struct {
// contains filtered or unexported fields
}
func NewGORMV2FromDSN ¶
func NewGORMV2FromDSN(pathToSqlFileName string, dbType string, dsn string) *MockGORMV2
func NewMockGORMV2 ¶
func NewMockGORMV2(pathToSqlFileName string, dbName string) *MockGORMV2
func (*MockGORMV2) DoRecord ¶
func (m *MockGORMV2) DoRecord(db *gorm.DB)
func (*MockGORMV2) DumpRecorderInfo ¶
func (m *MockGORMV2) DumpRecorderInfo() map[string][]string
func (*MockGORMV2) GetDBUtil ¶
func (m *MockGORMV2) GetDBUtil() *util.DBUtil
func (*MockGORMV2) GetDSN ¶
func (m *MockGORMV2) GetDSN() (dbType string, dsn string)
func (*MockGORMV2) InitSchemas ¶
func (m *MockGORMV2) InitSchemas(sqlSchema string)
func (*MockGORMV2) RegisterModels ¶
func (m *MockGORMV2) RegisterModels(models ...interface{})
RegisterModels 注册模型
func (*MockGORMV2) SaveRecordToFile ¶
func (m *MockGORMV2) SaveRecordToFile(dir string)
func (*MockGORMV2) SaveRecordToFileAuto ¶ added in v1.3.0
func (m *MockGORMV2) SaveRecordToFileAuto(dir string)
type MockXORM ¶
type MockXORM struct {
// contains filtered or unexported fields
}
func NewMockXORM ¶
func NewXORMFromDSN ¶
func (*MockXORM) DumpRecorderInfo ¶
func (*MockXORM) GetXORMEngine ¶
GetXORMEngine 获取 *xorm.Engine实例
func (*MockXORM) InitSchemas ¶
func (*MockXORM) RegisterModels ¶
func (m *MockXORM) RegisterModels(models ...interface{})
RegisterModels 注册模型
func (*MockXORM) SaveRecordToFile ¶
func (*MockXORM) SaveRecordToFileAuto ¶ added in v1.3.0
type MockZORM ¶
type MockZORM struct {
// contains filtered or unexported fields
}
func NewMockZORM ¶
func (*MockZORM) InitSchemas ¶
func (*MockZORM) RegisterModels ¶
func (m *MockZORM) RegisterModels(models ...interface{})
RegisterModels 注册模型
Click to show internal directories.
Click to hide internal directories.