( queryTimeoutMilliseconds: number = 30000, forceNewInstance: boolean = false, )
| 6 | * Initializes the connection to the Database |
| 7 | */ |
| 8 | export 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 | } |
no test coverage detected