MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / getDatabase

Function getDatabase

src/lib/usage-queries.ts:53–59  ·  view source on GitHub ↗
(dbPath: string = DEFAULT_DB_PATH)

Source from the content-addressed store, hash-verified

51}
52
53export 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)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected