MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / closeDatabase

Function closeDatabase

apps/desktop/main/worker/core/dbCore.ts:56–62  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

54 * 关闭指定会话的数据库连接
55 */
56export function closeDatabase(sessionId: string): void {
57 const db = dbCache.get(sessionId)
58 if (db) {
59 db.close()
60 dbCache.delete(sessionId)
61 }
62}
63
64/**
65 * 关闭所有数据库连接

Callers 4

dbWorker.tsFile · 0.90
ensureAliasesColumnFunction · 0.90
ensureAvatarColumnFunction · 0.90
withWritableAdapterFunction · 0.90

Calls 3

getMethod · 0.65
closeMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected