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

Function cypher_has_row_with

tests/test_cypher.c:2662–2677  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2660
2661/* Helper: check if any row has a column matching a value */
2662static bool cypher_has_row_with(const cbm_cypher_result_t *r, const char *col, const char *val) {
2663 int ci = -1;
2664 for (int c = 0; c < r->col_count; c++) {
2665 if (strcmp(r->columns[c], col) == 0) {
2666 ci = c;
2667 break;
2668 }
2669 }
2670 if (ci < 0)
2671 return false;
2672 for (int row = 0; row < r->row_count; row++) {
2673 if (strcmp(r->rows[row][ci], val) == 0)
2674 return true;
2675 }
2676 return false;
2677}
2678
2679TEST(cypher_edge_prop_access) {
2680 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