Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Commit

Permalink
Add GetStdTx
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaokongsheng committed Jan 4, 2019
1 parent 40186e8 commit 576b8ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions orm/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ func (tx *DBTx) AfterCommit(afterCommit func(err error)) {
tx.afterCommit = afterCommit
}

func (tx *DBTx) GetStdTx() *sql.Tx {
return tx.tx
}

func TransactFunc(db *DBStore, txFunc func(*DBTx) error) (err error) {
tx, err := db.BeginTx()
if err != nil {
Expand Down

0 comments on commit 576b8ba

Please sign in to comment.