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

Function parse_where

src/cypher/cypher.c:1308–1323  ·  view source on GitHub ↗

Parse WHERE clause — builds expression tree */

Source from the content-addressed store, hash-verified

1306
1307/* Parse WHERE clause — builds expression tree */
1308static int parse_where(parser_t *p, cbm_where_clause_t **out) {
1309 if (!match(p, TOK_WHERE)) {
1310 *out = NULL;
1311 return 0;
1312 }
1313
1314 cbm_where_clause_t *w = calloc(CBM_ALLOC_ONE, sizeof(cbm_where_clause_t));
1315 w->root = parse_or_expr(p);
1316 if (!w->root && p->error[0]) {
1317 free(w);
1318 return CBM_NOT_FOUND;
1319 }
1320
1321 *out = w;
1322 return 0;
1323}
1324
1325/* Helper: is token an aggregate function? */
1326static bool is_aggregate_tok(cbm_token_type_t t) {

Callers 2

parse_post_whereFunction · 0.85
cbm_parseFunction · 0.85

Calls 2

matchFunction · 0.85
parse_or_exprFunction · 0.85

Tested by

no test coverage detected