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

Function cypher_has_row_with

tests/test_cypher.c:1286–1301  ·  view source on GitHub ↗

Helper: check if any row has a column matching a value */

Source from the content-addressed store, hash-verified

1284
1285/* Helper: check if any row has a column matching a value */
1286static bool cypher_has_row_with(const cbm_cypher_result_t *r, const char *col, const char *val) {
1287 int ci = -1;
1288 for (int c = 0; c < r->col_count; c++) {
1289 if (strcmp(r->columns[c], col) == 0) {
1290 ci = c;
1291 break;
1292 }
1293 }
1294 if (ci < 0)
1295 return false;
1296 for (int row = 0; row < r->row_count; row++) {
1297 if (strcmp(r->rows[row][ci], val) == 0)
1298 return true;
1299 }
1300 return false;
1301}
1302
1303TEST(cypher_edge_prop_access) {
1304 cbm_store_t *s = setup_cypher_http_store();

Callers 1

test_cypher.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected