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

Function eval_case_expr

src/cypher/cypher.c:3002–3012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3000/* ── CASE expression evaluation ───────────────────────────────── */
3001
3002static const char *eval_case_expr(const cbm_case_expr_t *k, binding_t *b) {
3003 if (!k) {
3004 return "";
3005 }
3006 for (int i = 0; i < k->branch_count; i++) {
3007 if (eval_expr(k->branches[i].when_expr, b)) {
3008 return k->branches[i].then_val ? k->branches[i].then_val : "";
3009 }
3010 }
3011 return k->else_val ? k->else_val : "";
3012}
3013
3014/* ── Scan nodes for a pattern ─────────────────────────────────── */
3015

Callers 1

project_itemFunction · 0.85

Calls 1

eval_exprFunction · 0.85

Tested by

no test coverage detected