Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
*/
77
export
function
getDatabase() {
78
if
(!db) {
79
return
initDatabase()
80
}
81
return
db
82
}
83
84
/**
85
* Close the database connection
Callers
15
resolveProjectPathFromWorktree
Function · 0.90
createBranchesRouter
Function · 0.90
assertRegisteredWorktree
Function · 0.90
getRegisteredChat
Function · 0.90
storeOAuthToken
Function · 0.90
claude-code.ts
File · 0.90
getClaudeCodeToken
Function · 0.90
getAllMcpConfigHandler
Function · 0.90
claude.ts
File · 0.90
getAllCodexMcpConfigHandler
Function · 0.90
codex.ts
File · 0.90
chats.ts
File · 0.90
Calls
1
initDatabase
Function · 0.85
Tested by
no test coverage detected