MCPcopy Index your code
hub / github.com/linuxfoundation/crowd.dev / databaseInit

Function databaseInit

backend/src/database/databaseConnection.ts:8–21  ·  view source on GitHub ↗
(
  queryTimeoutMilliseconds: number = 30000,
  forceNewInstance: boolean = false,
)

Source from the content-addressed store, hash-verified

6 * Initializes the connection to the Database
7 */
8export async function databaseInit(
9 queryTimeoutMilliseconds: number = 30000,
10 forceNewInstance: boolean = false,
11) {
12 if (forceNewInstance) {
13 return models(queryTimeoutMilliseconds)
14 }
15
16 if (!cached) {
17 cached = models(queryTimeoutMilliseconds)
18 }
19
20 return cached
21}

Callers 10

getDatabaseMethod · 0.90
databaseMiddlewareFunction · 0.90
getGithubStrategyFunction · 0.90
getGoogleStrategyFunction · 0.90
index.tsFile · 0.90
constructorMethod · 0.90

Calls 1

modelsFunction · 0.85

Tested by

no test coverage detected