Helper: check if any row has a column matching a value */
| 1284 | |
| 1285 | /* Helper: check if any row has a column matching a value */ |
| 1286 | static 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 | |
| 1303 | TEST(cypher_edge_prop_access) { |
| 1304 | cbm_store_t *s = setup_cypher_http_store(); |