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

Function parse_where

src/cypher/cypher.c:1339–1354  ·  view source on GitHub ↗

Parse WHERE clause — builds expression tree */

Source from the content-addressed store, hash-verified

1337
1338/* Parse WHERE clause — builds expression tree */
1339static int parse_where(parser_t *p, cbm_where_clause_t **out) {
1340 if (!match(p, TOK_WHERE)) {
1341 *out = NULL;
1342 return 0;
1343 }
1344
1345 cbm_where_clause_t *w = calloc(CBM_ALLOC_ONE, sizeof(cbm_where_clause_t));
1346 w->root = parse_or_expr(p);
1347 if (!w->root && p->error[0]) {
1348 free(w);
1349 return CBM_NOT_FOUND;
1350 }
1351
1352 *out = w;
1353 return 0;
1354}
1355
1356/* Helper: is token an aggregate function? */
1357static bool is_aggregate_tok(cbm_token_type_t t) {

Callers 2

parse_post_whereFunction · 0.85
parse_query_blockFunction · 0.85

Calls 2

matchFunction · 0.85
parse_or_exprFunction · 0.85

Tested by

no test coverage detected