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

Function parse_order_by_clause

src/cypher/cypher.c:1597–1607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1595}
1596
1597static void parse_order_by_clause(parser_t *p, cbm_return_clause_t *r) {
1598 expect(p, TOK_BY);
1599 char order_buf[CBM_SZ_256];
1600 parse_order_by_expr(p, order_buf, sizeof(order_buf));
1601 r->order_by = heap_strdup(order_buf);
1602 if (match(p, TOK_ASC)) {
1603 r->order_dir = heap_strdup("ASC");
1604 } else if (match(p, TOK_DESC)) {
1605 r->order_dir = heap_strdup("DESC");
1606 }
1607}
1608
1609/* Parse RETURN/WITH clause (shared logic) */
1610static int parse_return_or_with(parser_t *p, cbm_return_clause_t **out, bool is_with) {

Callers 1

parse_return_or_withFunction · 0.85

Calls 4

expectFunction · 0.85
parse_order_by_exprFunction · 0.85
matchFunction · 0.85
heap_strdupFunction · 0.70

Tested by

no test coverage detected