Module sql_ast::ast[][src]

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 before AS, 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 including WITH, UNION / other set operations, and ORDER BY.

A restricted variant of SELECT (without CTEs/ORDER BY), which may appear either as the only body item of an SQLQuery, or as an operand to a set operation like UNION.

Specifies the data processed by a window function, e.g. RANGE UNBOUNDED PRECEDING or ROWS 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

ColumnOptions are modifiers that follow a column definition in a CREATE 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 an ALTER 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

Specifies WindowFrame’s start_bound and end_bound