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

Function parse_order_by_var

src/cypher/cypher.c:1705–1717  ·  view source on GitHub ↗

Parse var[.prop] for ORDER BY */

Source from the content-addressed store, hash-verified

1703
1704/* Parse var[.prop] for ORDER BY */
1705static void parse_order_by_var(parser_t *p, char *buf, size_t buf_sz) {
1706 const cbm_token_t *var = expect(p, TOK_IDENT);
1707 if (!var) {
1708 return;
1709 }
1710 snprintf(buf, buf_sz, "%s", var->text);
1711 if (match(p, TOK_DOT)) {
1712 const cbm_token_t *prop = expect(p, TOK_IDENT);
1713 if (prop) {
1714 snprintf(buf, buf_sz, "%s.%s", var->text, prop->text);
1715 }
1716 }
1717}
1718
1719/* Parse ORDER BY expression into buf. Returns buf. */
1720static 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