- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for BeginTransaction (0.06 sec)
-
callbacks/transaction.go
package callbacks import ( "gorm.io/gorm" ) func BeginTransaction(db *gorm.DB) { if !db.Config.SkipDefaultTransaction && db.Error == nil { if tx := db.Begin(); tx.Error == nil { db.Statement.ConnPool = tx.Statement.ConnPool db.InstanceSet("gorm:started_transaction", true) } else if tx.Error == gorm.ErrInvalidTransaction { tx.Error = nil } else { db.Error = tx.Error } } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Nov 29 01:33:20 UTC 2021 - 675 bytes - Viewed (0)