Expand description
SQL Abstract Syntax Tree (AST) types
Structs§
- Assignment
- SQL assignment
foo = expras used in Update - Case
When - A WHEN clause in a CASE expression containing both the condition and its corresponding result
- Copy
- Cte
- A single CTE (used after
WITH):<alias> [(col1, col2, ...)] AS <materialized> ( <query> )The names in the column list beforeAS, when specified, replace the names of the columns returned by the query. The parser does not validate that the number of columns in the query matches the number of columns in the query. - Delete
- DELETE statement.
- Display
Comma Separated - A value that displays a comma-separated list of values. When pretty-printed (using {:#}), it displays each value on a new line.
- Display
Separated - Expr
With Alias - An expression optionally followed by an alias.
- Ident
- An identifier, decomposed into its value or character data and the quote style.
- Indent
- A wrapper around a value that adds an indent to the value when displayed with {:#}.
- Insert
- INSERT statement.
- Join
- Lateral
View - A hive LATERAL VIEW with potential column aliases
- Object
Name - A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj
- OrderBy
- Order
ByExpr - An
ORDER BYexpression - Order
ByOptions - Query
- The most complete variant of a
SELECTquery expression, optionally includingWITH,UNION/ other set operations, andORDER BY. - RelNamed
- A table name or a parenthesized subquery with an optional alias
- Select
- A restricted variant of
SELECT(without CTEs/ORDER BY), which may appear either as the only body item of aQuery, or as an operand to a set operation likeUNION. - Select
Into - Select
Item - One item of the comma-separated list following
SELECT - Table
Alias - Update
- Values
- With
Enums§
- Assignment
Target - Left-hand side of an assignment in an UPDATE statement,
e.g.
fooinfoo = 5(ColumnName assignment) or(a, b)in(a, b) = (1, 2)(Tuple assignment). - CteAs
Materialized - Distinct
- Expr
- An SQL expression of any type.
- Join
Constraint - Join
Operator - Order
ByKind - RelExpr
- SetExpr
- A node in a tree, representing a “query body” expression, roughly:
SELECT ... [ {UNION|EXCEPT|INTERSECT} SELECT ...] - SetOperator
- SetQuantifier
- A quantifier for SetOperator.
- Table
Version