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

Function binding_has_value

src/cypher/cypher.c:5235–5251  ·  view source on GitHub ↗

Accumulate a binding into RETURN aggregation */

Source from the content-addressed store, hash-verified

5233
5234/* Accumulate a binding into RETURN aggregation */
5235static bool binding_has_value(binding_t *b, const char *var, const char *prop) {
5236 if (!var || strcmp(var, "*") == 0) {
5237 return true;
5238 }
5239 char full[CBM_SZ_256];
5240 if (prop) {
5241 snprintf(full, sizeof(full), "%s.%s", var, prop);
5242 } else {
5243 snprintf(full, sizeof(full), "%s", var);
5244 }
5245 for (int i = 0; i < b->var_count; i++) {
5246 if (strcmp(b->var_names[i], full) == 0) {
5247 return true;
5248 }
5249 }
5250 return binding_get_edge(b, var) != NULL || binding_get(b, var) != NULL;
5251}
5252
5253static void ret_agg_accumulate(ret_agg_entry_t *entry, cbm_return_clause_t *ret, binding_t *b) {
5254 for (int ci = 0; ci < ret->count; ci++) {

Callers 1

ret_agg_accumulateFunction · 0.85

Calls 2

binding_get_edgeFunction · 0.85
binding_getFunction · 0.85

Tested by

no test coverage detected