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

Function parse_order_by_var

src/cypher/cypher.c:1572–1584  ·  view source on GitHub ↗

Parse var[.prop] for ORDER BY */

Source from the content-addressed store, hash-verified

1570
1571/* Parse var[.prop] for ORDER BY */
1572static void parse_order_by_var(parser_t *p, char *buf, size_t buf_sz) {
1573 const cbm_token_t *var = expect(p, TOK_IDENT);
1574 if (!var) {
1575 return;
1576 }
1577 snprintf(buf, buf_sz, "%s", var->text);
1578 if (match(p, TOK_DOT)) {
1579 const cbm_token_t *prop = expect(p, TOK_IDENT);
1580 if (prop) {
1581 snprintf(buf, buf_sz, "%s.%s", var->text, prop->text);
1582 }
1583 }
1584}
1585
1586/* Parse ORDER BY expression into buf. Returns buf. */
1587static char *parse_order_by_expr(parser_t *p, char *buf, size_t buf_sz) {

Callers 1

parse_order_by_exprFunction · 0.85

Calls 2

expectFunction · 0.85
matchFunction · 0.85

Tested by

no test coverage detected