MCPcopy
hub / github.com/determined-ai/determined / Bun

Function Bun

master/internal/db/postgres.go:85–90  ·  view source on GitHub ↗

Bun returns the singleton database connection through the bun library. bun is the database library we have decided to use for new code in the future due to its superior composability over bare SQL, and its superior flexibility over e.g. gorm. New code should not use the old bare SQL tooling.

()

Source from the content-addressed store, hash-verified

83// over bare SQL, and its superior flexibility over e.g. gorm. New code should not use the old bare
84// SQL tooling.
85func Bun() *bun.DB {
86 if theOneBun == nil {
87 panic("Bun is not yet initialized! Did you use the database before initializing it?")
88 }
89 return theOneBun
90}
91
92// SingleDB returns a singleton database client. Bun() should be preferred over this for all new
93// queries.

Callers 15

ConnectMasterFunction · 0.92
APICredentialsFunction · 0.92
GetAddProjectQueryFunction · 0.92
GetUpdateProjectQueryFunction · 0.92
GetDeleteProjectQueryFunction · 0.92
TestPatchProjectFunction · 0.92

Calls

no outgoing calls