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

Function resolve_condition_value

src/cypher/cypher.c:2342–2356  ·  view source on GitHub ↗

Resolve the actual property value for a condition from a binding */

Source from the content-addressed store, hash-verified

2340
2341/* Resolve the actual property value for a condition from a binding */
2342static const char *resolve_condition_value(const cbm_condition_t *c, binding_t *b) {
2343 cbm_edge_t *e = binding_get_edge(b, c->variable);
2344 if (e) {
2345 return edge_prop(e, c->property);
2346 }
2347 cbm_node_t *n = binding_get(b, c->variable);
2348 if (!n) {
2349 return NULL; /* unbound variable */
2350 }
2351 if (c->property) {
2352 return node_prop(n, c->property, b->store);
2353 }
2354 /* Bare alias (e.g. post-WITH virtual var) — use node name directly */
2355 return n->name ? n->name : "";
2356}
2357
2358/* Evaluate a comparison operator between actual and expected strings. */
2359static bool eval_comparison_op(const char *op, const char *actual, const char *expected) {

Callers 1

eval_conditionFunction · 0.85

Calls 4

binding_get_edgeFunction · 0.85
edge_propFunction · 0.85
binding_getFunction · 0.85
node_propFunction · 0.85

Tested by

no test coverage detected