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

Function parse_where

src/cypher/cypher.c:1175–1190  ·  view source on GitHub ↗

Parse WHERE clause — builds expression tree */

Source from the content-addressed store, hash-verified

1173
1174/* Parse WHERE clause — builds expression tree */
1175static int parse_where(parser_t *p, cbm_where_clause_t **out) {
1176 if (!match(p, TOK_WHERE)) {
1177 *out = NULL;
1178 return 0;
1179 }
1180
1181 cbm_where_clause_t *w = calloc(CBM_ALLOC_ONE, sizeof(cbm_where_clause_t));
1182 w->root = parse_or_expr(p);
1183 if (!w->root && p->error[0]) {
1184 free(w);
1185 return CBM_NOT_FOUND;
1186 }
1187
1188 *out = w;
1189 return 0;
1190}
1191
1192/* Helper: is token an aggregate function? */
1193static 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