MCPcopy
hub / github.com/21st-dev/1code / getDatabase

Function getDatabase

src/main/lib/db/index.ts:77–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 * Get the database instance
76 */
77export function getDatabase() {
78 if (!db) {
79 return initDatabase()
80 }
81 return db
82}
83
84/**
85 * Close the database connection

Callers 15

createBranchesRouterFunction · 0.90
assertRegisteredWorktreeFunction · 0.90
getRegisteredChatFunction · 0.90
storeOAuthTokenFunction · 0.90
claude-code.tsFile · 0.90
getClaudeCodeTokenFunction · 0.90
getAllMcpConfigHandlerFunction · 0.90
claude.tsFile · 0.90
codex.tsFile · 0.90
chats.tsFile · 0.90

Calls 1

initDatabaseFunction · 0.85

Tested by

no test coverage detected