()
| 55 | * Get database pool instance |
| 56 | */ |
| 57 | export function getPool(): Pool { |
| 58 | if (!pool) { |
| 59 | throw new Error("Database not initialized. Call initializeDatabase() first."); |
| 60 | } |
| 61 | return pool; |
| 62 | } |
| 63 | |
| 64 | /** Transient connection errors that are safe to retry once. */ |
| 65 | const TRANSIENT_CONNECTION_ERRORS = new Set([ |
no outgoing calls
no test coverage detected