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

Function execute_with_simple

src/cypher/cypher.c:4839–4859  ·  view source on GitHub ↗

Execute WITH simple (non-aggregate) projection */

Source from the content-addressed store, hash-verified

4837
4838/* Execute WITH simple (non-aggregate) projection */
4839static void execute_with_simple(cbm_return_clause_t *wc, binding_t *bindings, int bind_count,
4840 binding_t *vbindings, int *vcount) {
4841 for (int bi = 0; bi < bind_count; bi++) {
4842 binding_t vb = {0};
4843 vb.store = bindings[bi].store; /* so node_prop can re-fetch / compute on the projection */
4844 for (int ci = 0; ci < wc->count; ci++) {
4845 char name_buf[CBM_SZ_256];
4846 const char *alias = resolve_item_alias(&wc->items[ci], name_buf, sizeof(name_buf));
4847 const cbm_node_t *carried = with_item_carried_node(&wc->items[ci], &bindings[bi]);
4848 if (carried) {
4849 binding_set(&vb, with_item_node_alias(&wc->items[ci]), carried);
4850 continue;
4851 }
4852 char func_buf[CBM_SZ_512];
4853 const char *val =
4854 project_item(&bindings[bi], &wc->items[ci], func_buf, sizeof(func_buf));
4855 with_add_vbinding_var(&vb, alias, val);
4856 }
4857 vbindings[(*vcount)++] = vb;
4858 }
4859}
4860
4861static void with_sink_feed(with_sink_t *s, binding_t *bindings, int bind_count) {
4862 if (bind_count > 0 && !s->fed_any) {

Callers 1

with_sink_feedFunction · 0.85

Calls 6

resolve_item_aliasFunction · 0.85
with_item_carried_nodeFunction · 0.85
binding_setFunction · 0.85
with_item_node_aliasFunction · 0.85
project_itemFunction · 0.85
with_add_vbinding_varFunction · 0.85

Tested by

no test coverage detected