MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / asCoreDb

Function asCoreDb

apps/desktop/main/worker/query/sessions.ts:36–38  ·  view source on GitHub ↗

* Wrap a better-sqlite3 Database as a DatabaseAdapter for core query functions.

(db: Database.Database)

Source from the content-addressed store, hash-verified

34 * Wrap a better-sqlite3 Database as a DatabaseAdapter for core query functions.
35 */
36function asCoreDb(db: Database.Database): DatabaseAdapter {
37 return db as unknown as DatabaseAdapter
38}
39
40/**
41 * 判断是否为聊天会话数据库(local fast check, avoids core import overhead for non-session DBs)

Callers 4

resolveOverviewFunction · 0.85
getAllSessionsFunction · 0.85
getSessionFunction · 0.85
getChatOverviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected