MCPcopy
hub / github.com/pocketbase/pocketbase / DB

Method DB

core/base.go:490–500  ·  view source on GitHub ↗

DB returns the default app data.db builder instance. To minimize SQLITE_BUSY errors, it automatically routes the SELECT queries to the underlying concurrent db pool and everything else to the nonconcurrent one. For more finer control over the used connections pools you can call directly Concurrent

()

Source from the content-addressed store, hash-verified

488// For more finer control over the used connections pools you can
489// call directly ConcurrentDB() or NonconcurrentDB().
490func (app *BaseApp) DB() dbx.Builder {
491 // transactional or both are nil
492 if app.concurrentDB == app.nonconcurrentDB {
493 return app.concurrentDB
494 }
495
496 return &dualDBBuilder{
497 concurrentDB: app.concurrentDB,
498 nonconcurrentDB: app.nonconcurrentDB,
499 }
500}
501
502// ConcurrentDB returns the concurrent app data.db builder instance.
503//

Callers 3

TestBaseAppBootstrapFunction · 0.95
DeleteViewMethod · 0.95
NewTestAppWithConfigFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestBaseAppBootstrapFunction · 0.76