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

Function start_source_open

src/cypher/cypher.c:6057–6074  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6055}
6056
6057static void start_source_open(start_source_t *src, cbm_store_t *store, const char *project,
6058 const cbm_node_pattern_t *node) {
6059 memset(src, 0, sizeof(*src));
6060 src->store = store;
6061 src->project = project;
6062 src->node = node;
6063 if (node->label && strchr(node->label, '|')) {
6064 src->labels = cbm_mem_strdup(CBM_MEM_CLASS_OTHER, node->label);
6065 if (!src->labels) {
6066 start_source_fail(src, "out of memory");
6067 }
6068 return; /* one scan per label, opened as the previous one ends */
6069 }
6070 src->scan = cbm_store_node_scan_open(store, project, node->label);
6071 if (!src->scan) {
6072 start_source_fail(src, cbm_store_error(store));
6073 }
6074}
6075
6076/* Open the next label's scan of an alternation; false when none is left. */
6077static bool start_source_next_label(start_source_t *src) {

Callers 1

execute_singleFunction · 0.85

Calls 4

cbm_mem_strdupFunction · 0.85
start_source_failFunction · 0.85
cbm_store_node_scan_openFunction · 0.85
cbm_store_errorFunction · 0.85

Tested by

no test coverage detected