MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / Query

Class Query

src/sql-parser/src/ast/defs/query.rs:31–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29/// including `WITH`, `UNION` / other set operations, and `ORDER BY`.
30#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
31pub 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
45impl<T: AstInfo> AstDisplay for Query<T> {
46 fn fmt<W: fmt::Write>(&self, f: &mut AstFormatter<W>) {

Callers 5

queryMethod · 0.70
parse_query_bodyMethod · 0.50
parse_insertMethod · 0.50
parse_subscribeMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected