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

Function execute_with_simple

src/cypher/cypher.c:4018–4033  ·  view source on GitHub ↗

Execute WITH simple (non-aggregate) projection */

Source from the content-addressed store, hash-verified

4016
4017/* Execute WITH simple (non-aggregate) projection */
4018static void execute_with_simple(cbm_return_clause_t *wc, binding_t *bindings, int bind_count,
4019 binding_t *vbindings, int *vcount) {
4020 for (int bi = 0; bi < bind_count; bi++) {
4021 binding_t vb = {0};
4022 vb.store = bindings[bi].store; /* so node_prop can re-fetch / compute on the projection */
4023 for (int ci = 0; ci < wc->count; ci++) {
4024 char name_buf[CBM_SZ_256];
4025 const char *alias = resolve_item_alias(&wc->items[ci], name_buf, sizeof(name_buf));
4026 char func_buf[CBM_SZ_512];
4027 const char *val =
4028 project_item(&bindings[bi], &wc->items[ci], func_buf, sizeof(func_buf));
4029 with_add_vbinding_var(&vb, alias, val);
4030 }
4031 vbindings[(*vcount)++] = vb;
4032 }
4033}
4034
4035/* Apply post-WITH WHERE filter */
4036static void filter_bindings_where(const cbm_where_clause_t *where, binding_t *vbindings,

Callers 1

execute_with_clauseFunction · 0.85

Calls 3

resolve_item_aliasFunction · 0.85
project_itemFunction · 0.85
with_add_vbinding_varFunction · 0.85

Tested by

no test coverage detected