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

Function ensureAdapter

apps/desktop/main/worker/query/sql.ts:22–26  ·  view source on GitHub ↗
(sessionId: string)

Source from the content-addressed store, hash-verified

20}
21
22function ensureAdapter(sessionId: string) {
23 const adapter = openDatabaseAdapter(sessionId)
24 if (!adapter) throw new Error('Database not found')
25 return adapter
26}
27
28export function getSchema(sessionId: string): TableSchema[] {
29 return getSchemaDetailed(ensureAdapter(sessionId))

Callers 3

getSchemaFunction · 0.85
executePluginQueryFunction · 0.85
executeRawSQLFunction · 0.85

Calls 1

openDatabaseAdapterFunction · 0.90

Tested by

no test coverage detected