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

Function gd_project

src/store/store_graph_digest.c:461–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461static bool gd_project(gd_context_t *g, const unsigned char *project, size_t length) {
462 if (!gd_prepare(g, "SELECT 1 FROM main.projects WHERE CAST(name AS BLOB)=?1 LIMIT 2;")) {
463 return false;
464 }
465 int rc = sqlite3_bind_blob(g->stmt, 1, project, (int)length, SQLITE_STATIC);
466 if (rc != SQLITE_OK) {
467 gd_sql_failure(g, rc);
468 return false;
469 }
470 rc = gd_step(g);
471 if (rc == SQLITE_DONE) {
472 return gd_fail(g, CBM_STORE_GRAPH_DIGEST_PROJECT_MISSING);
473 }
474 if (rc != SQLITE_ROW) {
475 return false;
476 }
477 rc = gd_step(g);
478 if (rc == SQLITE_ROW) {
479 return gd_fail(g, CBM_STORE_GRAPH_DIGEST_SCHEMA);
480 }
481 return rc == SQLITE_DONE && gd_finalize(g);
482}
483
484static bool gd_table_header(gd_context_t *g, int index, bool present) {
485 const gd_table_t *table = &gd_tables[index];

Callers 1

cbm_store_graph_digestFunction · 0.85

Calls 5

gd_prepareFunction · 0.85
gd_sql_failureFunction · 0.85
gd_stepFunction · 0.85
gd_failFunction · 0.85
gd_finalizeFunction · 0.85

Tested by

no test coverage detected