You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
505 B

  1. package container
  2. import (
  3. "github.com/go-xorm/xorm"
  4. )
  5. // 事务句柄工厂
  6. type TransactionHandlerFactory interface {
  7. // 创建事务句柄
  8. // 返回值:
  9. // 1.事务句柄
  10. // 2.错误
  11. Create() (TransactionHandler, error)
  12. }
  13. // 创建事务句柄工厂
  14. // 参数:
  15. // 1.xorm引擎
  16. // 返回值:
  17. // 1.事务句柄工厂
  18. // 异常:
  19. // 1.xorm.Engine不能为空!
  20. func NewTransactionHandlerFactory(engine *xorm.Engine) TransactionHandlerFactory {
  21. return NewDefaultTransactionHandlerFactory(engine)
  22. }