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

Function parse_where

src/cypher/cypher.c:1309–1324  ·  view source on GitHub ↗

Parse WHERE clause — builds expression tree */

Source from the content-addressed store, hash-verified

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