Structs§
- Alter
Table Statement - ALTER TABLE statement.
- Column
Def - A column definition in CREATE TABLE.
- Create
Table Statement - A CREATE TABLE statement.
- Create
View Statement - CREATE VIEW statement.
- Cte
- A Common Table Expression:
name [(col1, col2)] AS [NOT] MATERIALIZED (query) - Delete
Statement - A DELETE statement.
- Drop
Table Statement - A DROP TABLE statement.
- Drop
View Statement - DROP VIEW statement.
- Explain
Statement - EXPLAIN statement.
- From
Clause - A FROM clause, now supporting subqueries and multiple tables.
- Insert
Statement - An INSERT statement, now supporting INSERT … SELECT and ON CONFLICT.
- Join
Clause - A JOIN clause.
- OnConflict
- Order
ByItem - An ORDER BY item.
- Select
Statement - A SELECT statement, including CTEs.
- SetOperation
Statement - UNION / INTERSECT / EXCEPT between two or more queries.
- Table
Ref - A reference to a table.
- Truncate
Statement - TRUNCATE TABLE statement.
- Update
Statement - An UPDATE statement.
- UseStatement
- USE database statement.
- Window
Definition - Named WINDOW definition:
window_name AS (window_spec) - Window
Frame - Window
Spec - Window specification for window functions: OVER (PARTITION BY … ORDER BY … frame)
Enums§
- Alter
Table Action - Binary
Operator - Binary operators.
- Conflict
Action - Data
Type - SQL data types. Significantly expanded to match sqlglot’s DataType.Type enum.
- Date
Time Field - Expr
- An expression in SQL.
- Insert
Source - Join
Type - The type of JOIN.
- Quote
Style - How an identifier (column, table, alias) was quoted in the source SQL.
- Referential
Action - Select
Item - An item in a SELECT list.
- SetOperation
Type - Statement
- A fully parsed SQL statement.
- Table
Constraint - Table-level constraints.
- Table
Source - A table source can be a table reference, subquery, or table function.
- Transaction
Statement - Transaction control statements.
- Unary
Operator - Unary operators.
- Window
Frame Bound - Window
Frame Kind
Functions§
- find_
columns - Helper: collect all column references from an expression.
- find_
tables - Helper: collect all table references from a statement.