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

Function cbm_store_count_edges

src/store/store.c:2388–2405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2386}
2387
2388int cbm_store_count_edges(cbm_store_t *s, const char *project) {
2389 if (!s || !s->db) {
2390 return 0;
2391 }
2392 sqlite3_stmt *stmt =
2393 prepare_cached(s, &s->stmt_count_edges, "SELECT COUNT(*) FROM edges WHERE project = ?1;");
2394 if (!stmt) {
2395 return CBM_STORE_ERR;
2396 }
2397
2398 bind_text(stmt, SKIP_ONE, project);
2399 int count = 0;
2400 if (sqlite3_step(stmt) == SQLITE_ROW) {
2401 count = sqlite3_column_int(stmt, 0);
2402 }
2403 sqlite3_reset(stmt);
2404 return count;
2405}
2406
2407int cbm_store_count_edges_by_type(cbm_store_t *s, const char *project, const char *type) {
2408 sqlite3_stmt *stmt =

Callers 15

build_project_json_entryFunction · 0.85
handle_index_statusFunction · 0.85
handle_get_architectureFunction · 0.85
handle_project_healthFunction · 0.85
cbm_artifact_exportFunction · 0.85
run_closure_deltaFunction · 0.85
cx_runFunction · 0.85
test_integration.cFile · 0.85
test_pipeline.cFile · 0.85

Calls 2

prepare_cachedFunction · 0.85
bind_textFunction · 0.85

Tested by 3

cx_runFunction · 0.68
closure_fresh_fullFunction · 0.68
get_edge_countFunction · 0.68