Expand description
SQL Abstract Syntax Tree (AST) types
Structs§
- SQL assignment
foo = expr
as used in SQLUpdate - SQL column definition
- An optionally-named
ColumnOption
:[ CONSTRAINT <name> ] <column-option>
. - A single CTE (used after
WITH
):alias [(col1, col2, ...)] AS ( 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. - A function call
- An identifier, decomposed into its value or character data and the quote style.
- A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj
- SQL ORDER BY expression
- The most complete variant of a
SELECT
query expression, optionally includingWITH
,UNION
/ other set operations, andORDER BY
. - A restricted variant of
SELECT
(without CTEs/ORDER BY
), which may appear either as the only body item of anSQLQuery
, or as an operand to a set operation likeUNION
. - Specifies the data processed by a window function, e.g.
RANGE UNBOUNDED PRECEDING
orROWS BETWEEN 5 PRECEDING AND CURRENT ROW
. - A window specification (i.e.
OVER (PARTITION BY .. ORDER BY .. etc.)
)
Enums§
- An
ALTER TABLE
(Statement::AlterTable
) operation - Binary operators
ColumnOption
s are modifiers that follow a column definition in aCREATE TABLE
statement.- SQL data types
- An SQL expression of any type.
- External table’s available file format
- One item of the comma-separated list following
SELECT
- A node in a tree, representing a “query body” expression, roughly:
SELECT ... [ {UNION|EXCEPT|INTERSECT} SELECT ...]
- A top-level statement (SELECT, INSERT, CREATE, etc.)
- A table-level constraint, specified in a
CREATE TABLE
or anALTER TABLE ADD <constraint>
statement. - A table name or a parenthesized subquery with an optional alias
- Unary operators
- Primitive SQL values such as number and string