| 1595 | } |
| 1596 | |
| 1597 | static 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) */ |
| 1610 | static int parse_return_or_with(parser_t *p, cbm_return_clause_t **out, bool is_with) { |
no test coverage detected