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

Function cbm_store_open

src/store/store.c:1104–1118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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