|
|
- package container
-
- import (
- "github.com/go-xorm/xorm"
- )
-
- // 事务句柄工厂
- type TransactionHandlerFactory interface {
- // 创建事务句柄
- // 返回值:
- // 1.事务句柄
- // 2.错误
- Create() (TransactionHandler, error)
- }
-
- // 创建事务句柄工厂
- // 参数:
- // 1.xorm引擎
- // 返回值:
- // 1.事务句柄工厂
- // 异常:
- // 1.xorm.Engine不能为空!
- func NewTransactionHandlerFactory(engine *xorm.Engine) TransactionHandlerFactory {
- return NewDefaultTransactionHandlerFactory(engine)
- }
|