Expand description
SQL Abstract Syntax Tree node types for FrankenSQLite.
This module defines the complete AST type hierarchy for the SQLite SQL
dialect. Every SQL statement parsed by fsqlite-parser produces a tree of
these nodes. All expression nodes carry a Span for error reporting.
Reference: §10.3–10.4 of the FrankenSQLite specification.
Modules§
- rebase
- Expression rebase safety validation (§5.10.1).
Structs§
- Alter
Table Statement - An ALTER TABLE statement.
- Assignment
- A SET assignment:
column = expror(col1, col2) = expr. - Attach
Statement - An ATTACH statement.
- Begin
Statement - A BEGIN statement.
- Column
Constraint - A constraint on a single column.
- Column
Def - A column definition.
- Column
Ref - A reference to a column, possibly qualified with a table name and, for a
three-part
schema.table.columnreference, a leading database/schema name. - Create
Index Statement - A CREATE INDEX statement.
- Create
Table Statement - A CREATE TABLE statement.
- Create
Trigger Statement - A CREATE TRIGGER statement.
- Create
View Statement - A CREATE VIEW statement.
- Create
Virtual Table Statement - A CREATE VIRTUAL TABLE statement.
- Cte
- A single Common Table Expression definition.
- Deferrable
- Deferrable constraint specification.
- Delete
Statement - A DELETE statement.
- Drop
Statement - A DROP statement.
- Foreign
KeyAction - Foreign key ON DELETE/UPDATE action.
- Foreign
KeyClause - A REFERENCES clause for foreign keys.
- Frame
Spec - Window frame specification.
- From
Clause - The FROM clause.
- Indexed
Column - An indexed column specification (for PRIMARY KEY, UNIQUE, CREATE INDEX).
- Insert
Statement - An INSERT statement.
- Join
Clause - A JOIN clause.
- Join
Type - Join type modifiers.
- Limit
Clause - LIMIT clause:
LIMIT expr [OFFSET expr]orLIMIT expr, expr. - Ordering
Term - ORDER BY term.
- Pragma
Statement - A PRAGMA statement.
- Qualified
Name - A possibly-schema-qualified name like
main.usersor justusers. - Qualified
Table Ref - A table reference with optional alias and index hint (for UPDATE/DELETE).
- Resolved
Column - A resolved column reference after name resolution.
- Resolver
Scope - A scope for name resolution, supporting nested subquery scopes.
- Rollback
Statement - A ROLLBACK statement.
- Select
Body - The body of a SELECT: one or more SELECT cores connected by compound ops.
- Select
Statement - A full SELECT statement, including WITH, ORDER BY, and LIMIT.
- Span
- A byte-offset range into the original SQL source text.
- SqlFunction
Call Ref - A borrowed semantic view of an expression that invokes a SQL function.
- Table
Constraint - A table-level constraint.
- Table
Schema - A table schema entry used during name resolution.
- Time
Travel Clause - A
FOR SYSTEM_TIME AS OF ...clause attached to a table reference. - Type
Name - A column type name as written in DDL (e.g.
VARCHAR(255),INTEGER). - Update
Statement - An UPDATE statement.
- Upsert
Clause - An ON CONFLICT (upsert) clause.
- Upsert
Target - Upsert conflict target.
- Vacuum
Statement - A VACUUM statement.
- Values
Clause - Rows and representation metadata for a first-class
VALUESclause. - Window
Def - Named window definition in the WINDOW clause.
- Window
Spec - Window specification for window functions.
- With
Clause - WITH clause for common table expressions.
Enums§
- Alter
Table Action - ALTER TABLE action variants.
- Assignment
Target - Left-hand side of an assignment.
- Binary
Op - Binary operators.
- Bound
Collation - Collation metadata retained by a value bound from an outer query.
- Column
Constraint Kind - Column constraint variants.
- Compound
Op - Compound SELECT operators.
- Conflict
Action - Conflict resolution action.
- Create
Table Body - The body of a CREATE TABLE.
- CteMaterialized
- CTE materialization hint.
- Default
Value - Default value for a column.
- Deferrable
Initially - INITIALLY DEFERRED or INITIALLY IMMEDIATE.
- Distinctness
- DISTINCT / ALL modifier on SELECT.
- Drop
Object Type - DROP target type.
- Expr
- An expression node in the AST.
- Foreign
KeyAction Type - Foreign key action type.
- Foreign
KeyTrigger - When the foreign key action fires.
- Frame
Bound - Window frame boundary.
- Frame
Exclude - Window frame EXCLUDE clause.
- Frame
Type - Window frame type.
- Function
Args - Function argument list.
- Generated
Storage - Generated column storage type.
- InSet
- The set of values for an IN expression.
- Index
Hint - Index hint on a FROM table reference.
- Insert
Source - Source of values for INSERT.
- Join
Constraint - Join constraint: ON expression or USING column list.
- Join
Kind - The kind of join.
- Json
Arrow - JSON access arrow types.
- LikeOp
- LIKE operator variants.
- Literal
- A literal value in SQL source.
- Nulls
Order - NULLS ordering.
- Placeholder
Type - Bind parameter types.
- Pragma
Value - PRAGMA value form.
- Raise
Action - RAISE action for trigger bodies.
- Resolve
Error - Errors during name resolution.
- Result
Column - A single column in the SELECT result list.
- Select
Core - A single SELECT core or VALUES clause.
- Sort
Direction - Sort direction.
- SqlFunction
Args Ref - A borrowed view of SQL function arguments.
- Statement
- A single parsed SQL statement.
- Table
Constraint Kind - Table constraint variants.
- Table
OrSubquery - A table source in a FROM clause.
- Time
Travel Target - Target for a
FOR SYSTEM_TIME AS OFclause. - Transaction
Mode - Transaction mode for BEGIN.
- Trigger
Event - Trigger event: INSERT, DELETE, or UPDATE [OF columns].
- Trigger
Timing - Trigger timing: BEFORE, AFTER, or INSTEAD OF.
- UnaryOp
- Unary operators.
- Upsert
Action - Upsert action: DO NOTHING or DO UPDATE SET …
- Values
Representation - How SQLite will execute a syntactic
VALUESclause. - Window
Reference - How a window specification refers to a named window.
Functions§
- quote_
ident_ if_ needed - Conditionally-quoted identifier as a
String.