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.

19 lines
339 B

package dorm
import ""
// Begin 开始事务,不需要创建 Session 对象
func (c *GormClient) Begin() *gorm.DB {
return c.db.Begin()
// Rollback 回滚事务
func (c *GormClient) Rollback() *gorm.DB {
return c.db.Rollback()
// Commit 提交事务
func (c *GormClient) Commit() *gorm.DB {
return c.db.Commit()