Skip to main contentModule ast
Source - AlterTableStatement
- ALTER TABLE statement.
- ColumnDef
- A column definition in CREATE TABLE.
- CreateTableStatement
- A CREATE TABLE statement.
- CreateViewStatement
- CREATE VIEW statement.
- Cte
- A Common Table Expression:
name [(col1, col2)] AS [NOT] MATERIALIZED (query) - DeleteStatement
- A DELETE statement.
- DropTableStatement
- A DROP TABLE statement.
- DropViewStatement
- DROP VIEW statement.
- ExplainStatement
- EXPLAIN statement.
- FromClause
- A FROM clause, now supporting subqueries and multiple tables.
- InsertStatement
- An INSERT statement, now supporting INSERT … SELECT and ON CONFLICT.
- JoinClause
- A JOIN clause.
- MergeClause
- A single WHEN MATCHED / WHEN NOT MATCHED clause in a MERGE statement.
- MergeStatement
- A MERGE (UPSERT) statement.
- OnConflict
- OrderByItem
- An ORDER BY item.
- PivotValue
- A value/column in a PIVOT IN list, optionally aliased.
- SelectStatement
- A SELECT statement, including CTEs.
- SetOperationStatement
- UNION / INTERSECT / EXCEPT between two or more queries.
- TableRef
- A reference to a table.
- TruncateStatement
- TRUNCATE TABLE statement.
- UpdateStatement
- An UPDATE statement.
- UseStatement
- USE database statement.
- WindowDefinition
- Named WINDOW definition:
window_name AS (window_spec) - WindowFrame
- WindowSpec
- Window specification for window functions: OVER (PARTITION BY … ORDER BY … frame)
- AlterTableAction
- BinaryOperator
- Binary operators.
- ConflictAction
- DataType
- SQL data types. Significantly expanded to match sqlglot’s DataType.Type enum.
- DateTimeField
- Expr
- An expression in SQL.
- InsertSource
- JoinType
- The type of JOIN.
- MergeAction
- The action to take in a MERGE WHEN clause.
- MergeClauseKind
- The kind of WHEN clause in a MERGE statement.
- QuoteStyle
- How an identifier (column, table, alias) was quoted in the source SQL.
- ReferentialAction
- SelectItem
- An item in a SELECT list.
- SetOperationType
- Statement
- A fully parsed SQL statement.
- TableConstraint
- Table-level constraints.
- TableSource
- A table source can be a table reference, subquery, or table function.
- TransactionStatement
- Transaction control statements.
- TrimType
- The type of TRIM operation.
- TypedFunction
- Typed function variants enabling per-function transpilation rules,
function signature validation, and dialect-specific code generation.
- UnaryOperator
- Unary operators.
- WindowFrameBound
- WindowFrameKind
- find_columns
- Helper: collect all column references from an expression.
- find_tables
- Helper: collect all table references from a statement.