MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cbm_store_open

Function cbm_store_open

src/store/store.c:1105–1119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1103}
1104
1105cbm_store_t *cbm_store_open(const char *project) {
1106 if (!project) {
1107 return NULL;
1108 }
1109 if (!cbm_validate_project_name(project)) {
1110 return NULL;
1111 }
1112 const char *cdir = cbm_resolve_cache_dir();
1113 if (!cdir) {
1114 cdir = cbm_tmpdir();
1115 }
1116 char path[CBM_SZ_1K];
1117 snprintf(path, sizeof(path), "%s/%s.db", cdir, project);
1118 return store_open_internal(path, false, true);
1119}
1120
1121static void finalize_stmt(sqlite3_stmt **s) {
1122 if (*s) {

Callers 1

cbm_mcp_server_newFunction · 0.85

Calls 4

cbm_resolve_cache_dirFunction · 0.85
cbm_tmpdirFunction · 0.85
store_open_internalFunction · 0.85

Tested by

no test coverage detected