AuxRunInTransaction wraps fn into a transaction for the auxiliary app database. It is safe to nest RunInTransaction calls as long as you use the callback's txApp.
(fn func(txApp App) error)
| 19 | // |
| 20 | // It is safe to nest RunInTransaction calls as long as you use the callback's txApp. |
| 21 | func (app *BaseApp) AuxRunInTransaction(fn func(txApp App) error) error { |
| 22 | return app.runInTransaction(app.AuxNonconcurrentDB(), fn, true) |
| 23 | } |
| 24 | |
| 25 | func (app *BaseApp) runInTransaction(db dbx.Builder, fn func(txApp App) error, isForAuxDB bool) error { |
| 26 | switch txOrDB := db.(type) { |
no test coverage detected