Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EngineInterface ¶
type EngineInterface interface { Get(bean interface{}) (bool, error) Insert(beans ...interface{}) (int64, error) InsertOne(bean interface{}) (int64, error) SetMapper(mapper core.IMapper) ShowSQL(show ...bool) Logger() core.ILogger SetLogger(logger core.ILogger) NewSession() *xorm.Session CreateTables(beans ...interface{}) error DropTables(beans ...interface{}) error Delete(bean interface{}) (int64, error) Close() error Id(id interface{}) *xorm.Session IsTableExist(beanOrTableName interface{}) (bool, error) }
EngineInterface is used to mock db methods during unit tests
var Engine EngineInterface
Engine is the main entrypoint for database operations
type SessionInterface ¶
type SessionInterface interface { Begin() error Close() Cols(columns ...string) *xorm.Session Id(id interface{}) *xorm.Session Insert(beans ...interface{}) (int64, error) InsertOne(beans interface{}) (int64, error) Commit() error Rollback() error Update(bean interface{}, condiBean ...interface{}) (int64, error) }
SessionInterface is used to mock xorm.Session objects during unit tests
Click to show internal directories.
Click to hide internal directories.