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

Function parse_order_by_var

src/cypher/cypher.c:1735–1747  ·  view source on GitHub ↗

Parse var[.prop] for ORDER BY */

Source from the content-addressed store, hash-verified

1733
1734/* Parse var[.prop] for ORDER BY */
1735static void parse_order_by_var(parser_t *p, char *buf, size_t buf_sz) {
1736 const cbm_token_t *var = expect(p, TOK_IDENT);
1737 if (!var) {
1738 return;
1739 }
1740 snprintf(buf, buf_sz, "%s", var->text);
1741 if (match(p, TOK_DOT)) {
1742 const cbm_token_t *prop = expect(p, TOK_IDENT);
1743 if (prop) {
1744 snprintf(buf, buf_sz, "%s.%s", var->text, prop->text);
1745 }
1746 }
1747}
1748
1749/* Parse ORDER BY expression into buf. Returns buf. */
1750static 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