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

Function named_node_count

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

1903 * transcoded methods must exist even when their extracted relationships were
1904 * accidentally discarded. */
1905static int named_node_count(cbm_store_t *s, const char *project, const char *name) {
1906 cbm_node_t *nodes = NULL;
1907 int count = 0;
1908 if (cbm_store_find_nodes_by_name(s, project, name, &nodes, &count) != CBM_STORE_OK) {
1909 return -1;
1910 }
1911 if (nodes) {
1912 cbm_store_free_nodes(nodes, count);
1913 }
1914 return count;
1915}
1916
1917static int fixture_node_count(cbm_store_t *store, const char *project, const char *path,
1918 const char *name, const char *label) {

Callers 6

test_pipeline.cFile · 0.85
observe_xlang_routeFunction · 0.85
observe_named_edgeFunction · 0.85
observe_named_generationFunction · 0.85

Calls 2

cbm_store_free_nodesFunction · 0.85

Tested by

no test coverage detected