()
| 20 | } |
| 21 | |
| 22 | export async function testDbConnect() { |
| 23 | try { |
| 24 | await dbExecute('SELECT 1;') |
| 25 | return true |
| 26 | } catch (err) { |
| 27 | console.error(err) |
| 28 | return false |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | export function redactDbConnectionUrl(connectionUrl = '') { |
| 33 | if (!connectionUrl || connectionUrl.startsWith('file:') || connectionUrl === ':memory:') { |