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

Function eval_where_partial

src/cypher/cypher.c:2973–2991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2971}
2972
2973static cyp_partial_t eval_where_partial(const cbm_where_clause_t *w, binding_t *b) {
2974 if (!w) {
2975 return CYP_PARTIAL_TRUE;
2976 }
2977 if (w->root) {
2978 return eval_expr_partial(w->root, b);
2979 }
2980 /* Legacy flat evaluation */
2981 if (w->count == 0) {
2982 return CYP_PARTIAL_TRUE;
2983 }
2984 bool is_and = (w->op && strcmp(w->op, "AND") == 0) != 0;
2985 cyp_partial_t result = is_and ? CYP_PARTIAL_TRUE : CYP_PARTIAL_FALSE;
2986 for (int i = 0; i < w->count; i++) {
2987 cyp_partial_t r = eval_condition_partial(&w->conditions[i], b);
2988 result = is_and ? partial_and(result, r) : partial_or(result, r);
2989 }
2990 return result;
2991}
2992
2993/* Check if a string value looks like a regex pattern. */
2994static bool looks_like_regex(const char *s) {

Callers 1

execute_chunkFunction · 0.85

Calls 4

eval_expr_partialFunction · 0.85
eval_condition_partialFunction · 0.85
partial_andFunction · 0.85
partial_orFunction · 0.85

Tested by

no test coverage detected