Module sql::ast[][src]

SQL abstract syntax tree.

Modules

display
fold

Transformation of an owned AST.

transform

Provides a publicly available interface to transform our SQL ASTs.

visit

Traversal of an immutable AST.

visit_mut

Traversal of a mutable AST.

Structs

AlterIndexOptionsStatement

ALTER INDEX ... {RESET, SET}

AlterObjectRenameStatement

ALTER <OBJECT> ... RENAME TO

Assignment

SQL assignment foo = expr as used in SQLUpdate

CloseStatement

CLOSE ...

ColumnDef

SQL column definition

ColumnOptionDef

An optionally-named ColumnOption: [ CONSTRAINT <name> ] <column-option>.

CommitStatement

COMMIT [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]

CopyStatement

COPY

CreateDatabaseStatement

CREATE DATABASE

CreateIndexStatement

CREATE INDEX

CreateRoleStatement

A CREATE ROLE statement.

CreateSchemaStatement

CREATE SCHEMA

CreateSinkStatement

CREATE SINK

CreateSourceStatement

CREATE SOURCE

CreateSourcesStatement

CREATE SOURCES

CreateTableStatement

CREATE TABLE

CreateTypeStatement

CREATE TYPE ..

CreateViewStatement

CREATE VIEW

CsrSeed
Cte

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.

DeclareStatement

DECLARE ...

DeleteStatement

DELETE

DiscardStatement
DropDatabaseStatement
DropObjectsStatement

DROP

ExplainOptions
ExplainStatement

EXPLAIN ...

FetchStatement

FETCH ...

Function

A function call

Ident

An identifier.

InsertStatement

INSERT

IntervalValue

An intermediate value for Intervals, which tracks all data from the user, as well as the computed ParsedDateTime.

Join
Limit
OrderByExpr

SQL ORDER BY expression

PgTable

Information about upstream Postgres tables used for replication sources

Query

The most complete variant of a SELECT query expression, optionally including WITH, UNION / other set operations, and ORDER BY.

Raw
RollbackStatement

ROLLBACK [ TRANSACTION | WORK ] [ AND [ NO ] CHAIN ]

Select

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.

SelectStatement

SELECT

SetTransactionStatement

SET TRANSACTION ...

SetVariableStatement

SET <variable>

ShowColumnsStatement

SHOW COLUMNS

ShowCreateIndexStatement

SHOW CREATE INDEX <index>

ShowCreateSinkStatement

SHOW CREATE SINK <sink>

ShowCreateSourceStatement

SHOW CREATE SOURCE <source>

ShowCreateTableStatement

SHOW CREATE TABLE <table>

ShowCreateViewStatement

SHOW CREATE VIEW <view>

ShowDatabasesStatement

SHOW DATABASES

ShowIndexesStatement

SHOW INDEX|INDEXES|KEYS

ShowObjectsStatement

SHOW <object>S

ShowVariableStatement

SHOW <variable>

StartTransactionStatement

{ BEGIN [ TRANSACTION | WORK ] | START TRANSACTION } ...

SubscriptPosition
TableAlias
TableWithJoins
TailStatement

TAIL

UnresolvedObjectName

A name of a table, view, custom type, etc., possibly multi-part, i.e. db.schema.obj

UpdateStatement

UPDATE

ValueError
Values
WindowFrame

Specifies the data processed by a window function, e.g. RANGE UNBOUNDED PRECEDING or ROWS BETWEEN 5 PRECEDING AND CURRENT ROW.

WindowSpec

A window specification (i.e. OVER (PARTITION BY .. ORDER BY .. etc.))

WithOption

Enums

AlterIndexOptionsList
AvroSchema
CatalogName
ColumnOption

ColumnOptions are modifiers that follow a column definition in a CREATE TABLE statement.

Compression
Connector
CopyDirection
CopyRelation
CopyTarget
CreateRoleOption

Options that can be attached to CreateRoleStatement.

CreateTypeAs

CREATE TYPE .. AS <TYPE>

DataType

SQL data types

DbzMode
DiscardTarget
Distinct
Envelope
ExplainStage

Specifies what Statement::Explain is actually explaining

Explainee
Expr

An SQL expression of any type.

FetchDirection
Format
FunctionArgs

Arguments for a function call.

IfExistsBehavior
InsertSource
JoinConstraint
JoinOperator
MultiConnector
ObjectType
RawName
S3KeySource

The key sources specified in the S3 source's DISCOVER OBJECTS clause.

Schema
SelectItem

One item of the comma-separated list following SELECT

SetExpr

A node in a tree, representing a "query body" expression, roughly: SELECT ... [ {UNION|EXCEPT|INTERSECT} SELECT ...]

SetOperator
SetVariableValue
ShowStatementFilter
SqlOption
Statement

A top-level statement (SELECT, INSERT, CREATE, etc.)

TableConstraint

A table-level constraint, specified in a CREATE TABLE or an ALTER TABLE ADD <constraint> statement.

TableFactor

A table name or a parenthesized subquery with an optional alias

TransactionAccessMode
TransactionIsolationLevel
TransactionMode
Value

Primitive SQL values.

WindowFrameBound

Specifies WindowFrame's start_bound and end_bound

WindowFrameUnits
WithOptionValue

Traits

AstInfo