Module stmt

Module stmt 

Source
Expand description

SQL statement types for both DML and DDL operations.

Modules§

visit
Read-only AST visitor trait and helpers.
visit_mut
Mutable AST visitor trait and helpers.

Structs§

AddColumn
A statement to add a column to a table.
AlterColumn
A statement to alter a column in a table.
AlterColumnChanges
A statement to alter a column in a table.
AlterTable
A statement to alter a SQL table.
Assignments
An ordered map of field assignments for an Update statement.
Association
A reference to an association traversal from a source query.
ColumnDef
A column definition used in CREATE TABLE and ADD COLUMN statements.
Condition
A guard condition on an Update statement.
ConstInput
An Input implementation that resolves nothing.
CopyTable
A statement to copy rows from one table to another.
CreateIndex
A CREATE INDEX statement.
CreateTable
A CREATE TABLE statement.
Cte
A common table expression (CTE) within a With clause.
Delete
A DELETE statement that removes existing records.
DerivedRef
A resolved reference into a derived table column.
DropColumn
A statement to drop a column from a table.
DropIndex
A statement to drop a SQL index.
DropTable
A statement to drop a SQL table.
ExprAnd
A logical “and” of multiple expressions.
ExprAny
Returns true if any item in a collection evaluates to true.
ExprArg
A positional argument placeholder.
ExprBinaryOp
A binary operation between two expressions.
ExprCast
A type cast expression.
ExprColumn
A reference to a database column.
ExprContext
Provides schema-aware context for expression type inference and reference resolution.
ExprError
An expression representing an unreachable branch.
ExprExists
Tests whether a subquery returns any rows.
ExprInList
Tests whether a value is contained in a list.
ExprInSubquery
Tests whether a value is in the results of a subquery.
ExprIsNull
Tests whether an expression is null.
ExprIsVariant
Tests whether an expression evaluates to a specific enum variant.
ExprLet
A scoped binding expression with one or more bindings.
ExprList
A list of expressions.
ExprMap
A map/transform operation over a collection.
ExprMatch
A match expression that dispatches on a subject expression.
ExprNot
Negates a boolean expression.
ExprOr
A logical “or” of multiple expressions.
ExprProject
Projects a field or element from a base expression.
ExprRecord
A record of expressions.
ExprSetOp
A set operation combining multiple queries.
ExprStmt
A statement used as an expression.
Filter
A WHERE clause filter for statements.
FuncCount
The SQL COUNT aggregate function.
FuncLastInsertId
The LAST_INSERT_ID() function expression (MySQL-specific).
HashIndex
A unique hash index over a borrowed slice of Values.
Ident
A SQL identifier (table name, column name, etc.).
Insert
An INSERT statement that creates new records.
InsertTable
A lowered insert target specifying a database table and its columns.
Join
A join clause within a TableWithJoins.
LimitCursor
Cursor-based pagination parameters.
LimitOffset
Traditional SQL LIMIT … OFFSET … parameters.
MatchArm
A single arm in a match expression.
Name
A possibly schema-qualified SQL name (e.g. "users" or "public"."users").
OrderBy
An ORDER BY clause containing one or more ordering expressions.
OrderByExpr
A single expression within an OrderBy clause, with an optional sort direction.
Path
A rooted field traversal path through the application schema.
PathFieldSet
A set of field indices, backed by a bit set.
Pragma
A SQLite PRAGMA statement.
Projection
A sequence of field indices describing how to navigate into a nested value.
Query
A query statement that reads data from the database.
Select
A SELECT expression within a query body.
SortedIndex
A sorted index over a borrowed slice of Values.
SourceModel
A model-level data source.
SourceTable
A lowered table-level data source for a SELECT statement.
SourceTableId
An index into a SourceTable’s tables vector.
SparseRecord
A record where only a subset of fields are populated.
TableDerived
A derived table (inline subquery) used as a table reference.
TableWithJoins
A FROM item: a table reference paired with zero or more joins.
TypeUnion
A set of types representing the possible result types of a match expression.
TypedInput
An Input wrapper that validates resolved argument types against expected types at resolution time.
Update
An UPDATE statement that modifies existing records.
ValueRecord
An ordered sequence of Values representing a record (row).
ValueStream
An async stream of Values with optional type checking.
Values
A VALUES clause: a set of row expressions.
With
A WITH clause containing one or more common table expressions (CTEs).

Enums§

AlterTableAction
The action to perform in an ALTER TABLE statement.
Assignment
A field assignment within an Update statement.
BinaryOp
A binary comparison operator.
Direction
Sort direction for an OrderByExpr.
Entry
A borrowed reference to either an Expr or a Value within a composite structure.
EntryMut
A mutable reference to either an Expr or a Value within a composite structure.
Expr
An expression node in Toasty’s query AST.
ExprFunc
A function call expression.
ExprReference
A reference to a model, field, or column.
ExprSet
A set of rows produced by a query, set operation, or explicit values.
ExprTarget
What an expression in the current scope references.
InsertTarget
The target of an Insert statement.
JoinOp
The type of join and its ON condition.
Limit
A LIMIT clause restricting the number of rows returned by a query.
Lock
A row-level lock to acquire when executing a query.
PathRoot
The root of a path traversal.
ResolvedRef
Result of resolving an ExprReference to its concrete schema location.
Returning
Specifies what data a statement returns.
SetOp
A SQL set operation that combines result sets from multiple queries.
Source
The data source for a Select statement’s FROM clause.
Statement
A SQL statement, covering both DDL (schema changes) and DML (data manipulation).
TableFactor
A table reference within a TableWithJoins relation.
TableName
A reference to a table, either by schema ID or by a string identifier.
TableRef
A reference to a table within a SourceTable.
Type
Statement-level type system for values and expressions within Toasty’s query engine.
UpdateTarget
The target of an Update statement.
Value
A dynamically typed value used throughout Toasty’s query engine.

Traits§

EntryPath
A path that can be used to navigate into a composite Value or Expr.
Input
Provides runtime argument and reference resolution for expression evaluation and substitution.
IntoExprTarget
Conversion trait for producing an ExprTarget from a statement or schema element.
Node
A node in the statement AST that can be traversed by a visitor.
Project
Trait for types that can be projected through a Projection.
Resolve
Schema resolution trait used by ExprContext to look up models, tables, and the model-to-table mapping.
Visit
Immutable visitor trait for the statement AST.
VisitMut
Mutable visitor trait for the statement AST.