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

Function cbm_store_open

src/store/store.c:1230–1244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1228}
1229
1230cbm_store_t *cbm_store_open(const char *project) {
1231 if (!project) {
1232 return NULL;
1233 }
1234 if (!cbm_validate_project_name(project)) {
1235 return NULL;
1236 }
1237 const char *cdir = cbm_resolve_cache_dir();
1238 if (!cdir) {
1239 cdir = cbm_tmpdir();
1240 }
1241 char path[CBM_SZ_1K];
1242 snprintf(path, sizeof(path), "%s/%s.db", cdir, project);
1243 return store_open_internal(path, false, true);
1244}
1245
1246static void finalize_stmt(sqlite3_stmt **s) {
1247 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