Skip to main content

Crate fsqlite_ast

Crate fsqlite_ast 

Source
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§

AlterTableStatement
An ALTER TABLE statement.
Assignment
A SET assignment: column = expr or (col1, col2) = expr.
AttachStatement
An ATTACH statement.
BeginStatement
A BEGIN statement.
ColumnConstraint
A constraint on a single column.
ColumnDef
A column definition.
ColumnRef
A reference to a column, possibly qualified with a table name and, for a three-part schema.table.column reference, a leading database/schema name.
CreateIndexStatement
A CREATE INDEX statement.
CreateTableStatement
A CREATE TABLE statement.
CreateTriggerStatement
A CREATE TRIGGER statement.
CreateViewStatement
A CREATE VIEW statement.
CreateVirtualTableStatement
A CREATE VIRTUAL TABLE statement.
Cte
A single Common Table Expression definition.
Deferrable
Deferrable constraint specification.
DeleteStatement
A DELETE statement.
DropStatement
A DROP statement.
ForeignKeyAction
Foreign key ON DELETE/UPDATE action.
ForeignKeyClause
A REFERENCES clause for foreign keys.
FrameSpec
Window frame specification.
FromClause
The FROM clause.
IndexedColumn
An indexed column specification (for PRIMARY KEY, UNIQUE, CREATE INDEX).
InsertStatement
An INSERT statement.
JoinClause
A JOIN clause.
JoinType
Join type modifiers.
LimitClause
LIMIT clause: LIMIT expr [OFFSET expr] or LIMIT expr, expr.
OrderingTerm
ORDER BY term.
PragmaStatement
A PRAGMA statement.
QualifiedName
A possibly-schema-qualified name like main.users or just users.
QualifiedTableRef
A table reference with optional alias and index hint (for UPDATE/DELETE).
ResolvedColumn
A resolved column reference after name resolution.
ResolverScope
A scope for name resolution, supporting nested subquery scopes.
RollbackStatement
A ROLLBACK statement.
SelectBody
The body of a SELECT: one or more SELECT cores connected by compound ops.
SelectStatement
A full SELECT statement, including WITH, ORDER BY, and LIMIT.
Span
A byte-offset range into the original SQL source text.
SqlFunctionCallRef
A borrowed semantic view of an expression that invokes a SQL function.
TableConstraint
A table-level constraint.
TableSchema
A table schema entry used during name resolution.
TimeTravelClause
A FOR SYSTEM_TIME AS OF ... clause attached to a table reference.
TypeName
A column type name as written in DDL (e.g. VARCHAR(255), INTEGER).
UpdateStatement
An UPDATE statement.
UpsertClause
An ON CONFLICT (upsert) clause.
UpsertTarget
Upsert conflict target.
VacuumStatement
A VACUUM statement.
ValuesClause
Rows and representation metadata for a first-class VALUES clause.
WindowDef
Named window definition in the WINDOW clause.
WindowSpec
Window specification for window functions.
WithClause
WITH clause for common table expressions.

Enums§

AlterTableAction
ALTER TABLE action variants.
AssignmentTarget
Left-hand side of an assignment.
BinaryOp
Binary operators.
BoundCollation
Collation metadata retained by a value bound from an outer query.
ColumnConstraintKind
Column constraint variants.
CompoundOp
Compound SELECT operators.
ConflictAction
Conflict resolution action.
CreateTableBody
The body of a CREATE TABLE.
CteMaterialized
CTE materialization hint.
DefaultValue
Default value for a column.
DeferrableInitially
INITIALLY DEFERRED or INITIALLY IMMEDIATE.
Distinctness
DISTINCT / ALL modifier on SELECT.
DropObjectType
DROP target type.
Expr
An expression node in the AST.
ForeignKeyActionType
Foreign key action type.
ForeignKeyTrigger
When the foreign key action fires.
FrameBound
Window frame boundary.
FrameExclude
Window frame EXCLUDE clause.
FrameType
Window frame type.
FunctionArgs
Function argument list.
GeneratedStorage
Generated column storage type.
InSet
The set of values for an IN expression.
IndexHint
Index hint on a FROM table reference.
InsertSource
Source of values for INSERT.
JoinConstraint
Join constraint: ON expression or USING column list.
JoinKind
The kind of join.
JsonArrow
JSON access arrow types.
LikeOp
LIKE operator variants.
Literal
A literal value in SQL source.
NullsOrder
NULLS ordering.
PlaceholderType
Bind parameter types.
PragmaValue
PRAGMA value form.
RaiseAction
RAISE action for trigger bodies.
ResolveError
Errors during name resolution.
ResultColumn
A single column in the SELECT result list.
SelectCore
A single SELECT core or VALUES clause.
SortDirection
Sort direction.
SqlFunctionArgsRef
A borrowed view of SQL function arguments.
Statement
A single parsed SQL statement.
TableConstraintKind
Table constraint variants.
TableOrSubquery
A table source in a FROM clause.
TimeTravelTarget
Target for a FOR SYSTEM_TIME AS OF clause.
TransactionMode
Transaction mode for BEGIN.
TriggerEvent
Trigger event: INSERT, DELETE, or UPDATE [OF columns].
TriggerTiming
Trigger timing: BEFORE, AFTER, or INSTEAD OF.
UnaryOp
Unary operators.
UpsertAction
Upsert action: DO NOTHING or DO UPDATE SET …
ValuesRepresentation
How SQLite will execute a syntactic VALUES clause.
WindowReference
How a window specification refers to a named window.

Functions§

quote_ident_if_needed
Conditionally-quoted identifier as a String.