(dbPath: string = DEFAULT_DB_PATH)
| 51 | } |
| 52 | |
| 53 | export function getDatabase(dbPath: string = DEFAULT_DB_PATH): Database.Database | null { |
| 54 | if (!fs.existsSync(dbPath)) { |
| 55 | console.warn(`Database not found: ${dbPath}`); |
| 56 | return null; |
| 57 | } |
| 58 | return new Database(dbPath, { readonly: true }); |
| 59 | } |
| 60 | |
| 61 | /** |
| 62 | * Get cost summary (today, yesterday, this month, last month) |
nothing calls this directly
no outgoing calls
no test coverage detected