Skip to content

Commit

Permalink
修复:并发事务的线程安全问题
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Jan 26, 2024
1 parent 5a766ee commit 4ce826b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/iTransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import "database/sql"
type ITransaction interface {
// Begin 开始
// isolationLevels:事务等级
Begin(isolationLevels ...sql.IsolationLevel)
Begin(isolationLevels ...sql.IsolationLevel) error
// Commit 提交
Commit()
// Rollback 回滚
Rollback()
// Transaction 使用事务
Transaction(executeFn func())
Transaction(executeFn func(), isolationLevels ...sql.IsolationLevel)
}

0 comments on commit 4ce826b

Please sign in to comment.