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

Function named_node_count

tests/test_pipeline.c:1160–1170  ·  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

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