MCPcopy
hub / github.com/pocketbase/pocketbase / AuxRunInTransaction

Method AuxRunInTransaction

core/db_tx.go:21–23  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

initLoggerMethod · 0.95

Calls 2

runInTransactionMethod · 0.95
AuxNonconcurrentDBMethod · 0.95

Tested by

no test coverage detected