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
456 B

package container
import "github.com/go-xorm/xorm"
// 事务句柄
type TransactionHandler interface {
// 关闭会话
Close()
// 开启事务
// 返回值
// 1.错误
Begin() error
// 提交事务
// 返回值
// 1.错误
Commit() error
// xorm.Session
// 返回值
// 1.xorm.Session
Session() *xorm.Session
}
func NewTransactionHandler(session *xorm.Session) (TransactionHandler, error) {
return NewDefaultTransactionHandler(session)
}