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

Function where_forms_agree

tests/test_cypher.c:5378–5390  ·  view source on GitHub ↗

Every spelling in `forms` is one WHERE expression; all must yield `expected`. */

Source from the content-addressed store, hash-verified

5376
5377/* Every spelling in `forms` is one WHERE expression; all must yield `expected`. */
5378static int where_forms_agree(cbm_store_t *s, const char *const *forms, int form_count,
5379 const char *const *expected, int n) {
5380 for (int f = 0; f < form_count; f++) {
5381 char query[512];
5382 snprintf(query, sizeof(query), "MATCH (n) WHERE %s RETURN n.name", forms[f]);
5383 int rc = assert_name_set(s, query, expected, n);
5384 if (rc != 0) {
5385 printf(" form: %s\n", forms[f]);
5386 return rc;
5387 }
5388 }
5389 return 0;
5390}
5391
5392/* The early WHERE pass (execute_single) binds only the first MATCH alias, so
5393 * an operand on the second alias is UNKNOWN there and must neither decide nor

Callers 1

test_cypher.cFile · 0.85

Calls 1

assert_name_setFunction · 0.85

Tested by

no test coverage detected