| 29 | /// including `WITH`, `UNION` / other set operations, and `ORDER BY`. |
| 30 | #[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] |
| 31 | pub struct Query<T: AstInfo> { |
| 32 | /// WITH (common table expressions, or CTEs) |
| 33 | pub ctes: CteBlock<T>, |
| 34 | /// SELECT or UNION / EXCEPT / INTERSECT |
| 35 | pub body: SetExpr<T>, |
| 36 | /// ORDER BY |
| 37 | pub order_by: Vec<OrderByExpr<T>>, |
| 38 | /// `LIMIT { <N> | ALL }` |
| 39 | /// `FETCH { FIRST | NEXT } <N> { ROW | ROWS } | { ONLY | WITH TIES }` |
| 40 | pub limit: Option<Limit<T>>, |
| 41 | /// `OFFSET <N> { ROW | ROWS }` |
| 42 | pub offset: Option<Expr<T>>, |
| 43 | } |
| 44 | |
| 45 | impl<T: AstInfo> AstDisplay for Query<T> { |
| 46 | fn fmt<W: fmt::Write>(&self, f: &mut AstFormatter<W>) { |
no outgoing calls
no test coverage detected