MCPcopy Index your code
hub / github.com/coder/coder / NewDBWithSQLDB

Function NewDBWithSQLDB

coderd/database/dbtestutil/db.go:69–78  ·  view source on GitHub ↗
(t testing.TB, opts ...Option)

Source from the content-addressed store, hash-verified

67}
68
69func NewDBWithSQLDB(t testing.TB, opts ...Option) (database.Store, pubsub.Pubsub, *sql.DB) {
70 t.Helper()
71
72 var sqlDB *sql.DB
73 opts = append(opts, withReturnSQLDB(func(db *sql.DB) {
74 sqlDB = db
75 }))
76 db, ps := NewDB(t, opts...)
77 return db, ps, sqlDB
78}
79
80var DefaultTimezone = "America/St_Johns"
81

Callers 15

TestReinitFunction · 0.92
TestPatchChatFunction · 0.92
TestProvisionerJobsFunction · 0.92
TestPostWorkspaceBuildFunction · 0.92
TestReconcileSystemRolesFunction · 0.92
TestGetUserStatusCountsFunction · 0.92

Calls 3

withReturnSQLDBFunction · 0.85
NewDBFunction · 0.85
HelperMethod · 0.65

Tested by 15

TestReinitFunction · 0.74
TestPatchChatFunction · 0.74
TestProvisionerJobsFunction · 0.74
TestPostWorkspaceBuildFunction · 0.74
TestReconcileSystemRolesFunction · 0.74
TestGetUserStatusCountsFunction · 0.74