(db *gorm.DB)
| 18 | } |
| 19 | |
| 20 | func CommitOrRollbackTransaction(db *gorm.DB) { |
| 21 | if !db.Config.SkipDefaultTransaction { |
| 22 | if _, ok := db.InstanceGet("gorm:started_transaction"); ok { |
| 23 | if db.Error != nil { |
| 24 | db.Rollback() |
| 25 | } else { |
| 26 | db.Commit() |
| 27 | } |
| 28 | |
| 29 | db.Statement.ConnPool = db.ConnPool |
| 30 | } |
| 31 | } |
| 32 | } |
nothing calls this directly
no test coverage detected