Helper: find a column value in a cypher result row */
| 1275 | |
| 1276 | /* Helper: find a column value in a cypher result row */ |
| 1277 | static const char *cypher_get_col(const cbm_cypher_result_t *r, int row, const char *col) { |
| 1278 | for (int c = 0; c < r->col_count; c++) { |
| 1279 | if (strcmp(r->columns[c], col) == 0) |
| 1280 | return r->rows[row][c]; |
| 1281 | } |
| 1282 | return NULL; |
| 1283 | } |
| 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) { |