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

Function named_node_count

tests/test_pipeline.c:1159–1169  ·  view source on GitHub ↗

Count exact-name nodes without depending on project-prefixed qualified names. * Export-XML relationship tests use this as an anti-vacuous guard: the * transcoded methods must exist even when their extracted relationships were * accidentally discarded. */

Source from the content-addressed store, hash-verified

1157 * transcoded methods must exist even when their extracted relationships were
1158 * accidentally discarded. */
1159static int named_node_count(cbm_store_t *s, const char *project, const char *name) {
1160 cbm_node_t *nodes = NULL;
1161 int count = 0;
1162 if (cbm_store_find_nodes_by_name(s, project, name, &nodes, &count) != CBM_STORE_OK) {
1163 return -1;
1164 }
1165 if (nodes) {
1166 cbm_store_free_nodes(nodes, count);
1167 }
1168 return count;
1169}
1170
1171typedef struct {
1172 int run_rc;

Callers 5

observe_named_edgeFunction · 0.85
test_pipeline.cFile · 0.85
observe_named_generationFunction · 0.85

Calls 2

cbm_store_free_nodesFunction · 0.85

Tested by

no test coverage detected