Helper: check if any row has a column matching a value */
| 2660 | |
| 2661 | /* Helper: check if any row has a column matching a value */ |
| 2662 | static 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 | |
| 2679 | TEST(cypher_edge_prop_access) { |
| 2680 | cbm_store_t *s = setup_cypher_http_store(); |