Expand description
SQL statement types for both DML and DDL operations.
Modules§
Structs§
- AddColumn
- A statement to add a column to a table.
- Alter
Column - A statement to alter a column in a table.
- Alter
Column Changes - A statement to alter a column in a table.
- Alter
Table - A statement to alter a SQL table.
- Assignments
- An ordered map of field assignments for an
Updatestatement. - Association
- A reference to an association traversal from a source query.
- Column
Def - A column definition used in
CREATE TABLEandADD COLUMNstatements. - Condition
- A guard condition on an
Updatestatement. - Const
Input - An
Inputimplementation that resolves nothing. - Copy
Table - A statement to copy rows from one table to another.
- Create
Index - A
CREATE INDEXstatement. - Create
Table - A
CREATE TABLEstatement. - Cte
- A common table expression (CTE) within a
Withclause. - Delete
- A
DELETEstatement that removes existing records. - Derived
Ref - A resolved reference into a derived table column.
- Drop
Column - A statement to drop a column from a table.
- Drop
Index - A statement to drop a SQL index.
- Drop
Table - A statement to drop a SQL table.
- ExprAnd
- A logical “and” of multiple expressions.
- ExprAny
- Returns
trueif any item in a collection evaluates totrue. - ExprArg
- A positional argument placeholder.
- Expr
Binary Op - A binary operation between two expressions.
- Expr
Cast - A type cast expression.
- Expr
Column - A reference to a database column.
- Expr
Context - Provides schema-aware context for expression type inference and reference resolution.
- Expr
Error - An expression representing an unreachable branch.
- Expr
Exists - Tests whether a subquery returns any rows.
- Expr
InList - Tests whether a value is contained in a list.
- Expr
InSubquery - Tests whether a value is in the results of a subquery.
- Expr
IsNull - Tests whether an expression is null.
- Expr
IsVariant - Tests whether an expression evaluates to a specific enum variant.
- ExprLet
- A scoped binding expression with one or more bindings.
- Expr
List - A list of expressions.
- ExprMap
- A map/transform operation over a collection.
- Expr
Match - A match expression that dispatches on a subject expression.
- ExprNot
- Negates a boolean expression.
- ExprOr
- A logical “or” of multiple expressions.
- Expr
Project - Projects a field or element from a base expression.
- Expr
Record - A record of expressions.
- Expr
SetOp - A set operation combining multiple queries.
- Expr
Stmt - A statement used as an expression.
- Filter
- A
WHEREclause filter for statements. - Func
Count - The SQL
COUNTaggregate function. - Func
Last Insert Id - The
LAST_INSERT_ID()function expression (MySQL-specific). - Hash
Index - A unique hash index over a borrowed slice of
Values. - Ident
- A SQL identifier (table name, column name, etc.).
- Insert
- An
INSERTstatement that creates new records. - Insert
Table - A lowered insert target specifying a database table and its columns.
- Join
- A join clause within a
TableWithJoins. - Limit
Cursor - Cursor-based pagination parameters.
- Limit
Offset - Traditional SQL
LIMIT … OFFSET …parameters. - Match
Arm - A single arm in a match expression.
- Name
- A possibly schema-qualified SQL name (e.g.
"users"or"public"."users"). - OrderBy
- An
ORDER BYclause containing one or more ordering expressions. - Order
ByExpr - A single expression within an
OrderByclause, with an optional sort direction. - Path
- A rooted field traversal path through the application schema.
- Path
Field Set - 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
SELECTexpression within a query body. - Sorted
Index - A sorted index over a borrowed slice of
Values. - Source
Model - A model-level data source.
- Source
Table - A lowered table-level data source for a
SELECTstatement. - Source
Table Id - An index into a
SourceTable’stablesvector. - Sparse
Record - A record where only a subset of fields are populated.
- Table
Derived - A derived table (inline subquery) used as a table reference.
- Table
With Joins - A
FROMitem: a table reference paired with zero or more joins. - Type
Union - A set of types representing the possible result types of a match expression.
- Typed
Input - An
Inputwrapper that validates resolved argument types against expected types at resolution time. - Update
- An
UPDATEstatement that modifies existing records. - Value
Record - An ordered sequence of
Values representing a record (row). - Value
Stream - An async stream of
Values with optional type checking. - Values
- A
VALUESclause: a set of row expressions. - With
- A
WITHclause containing one or more common table expressions (CTEs).
Enums§
- Alter
Table Action - The action to perform in an ALTER TABLE statement.
- Assignment
- A field assignment within an
Updatestatement. - Binary
Op - A binary comparison operator.
- Direction
- Sort direction for an
OrderByExpr. - Entry
- A borrowed reference to either an
Expror aValuewithin a composite structure. - Entry
Mut - A mutable reference to either an
Expror aValuewithin a composite structure. - Expr
- An expression node in Toasty’s query AST.
- Expr
Func - A function call expression.
- Expr
Reference - A reference to a model, field, or column.
- ExprSet
- A set of rows produced by a query, set operation, or explicit values.
- Expr
Target - What an expression in the current scope references.
- Insert
Target - The target of an
Insertstatement. - JoinOp
- The type of join and its ON condition.
- Limit
- A
LIMITclause restricting the number of rows returned by a query. - Lock
- A row-level lock to acquire when executing a query.
- Path
Root - The root of a path traversal.
- Resolved
Ref - Result of resolving an
ExprReferenceto 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
Selectstatement’sFROMclause. - Statement
- A SQL statement, covering both DDL (schema changes) and DML (data manipulation).
- Table
Factor - A table reference within a
TableWithJoinsrelation. - Table
Name - A reference to a table, either by schema ID or by a string identifier.
- Table
Ref - A reference to a table within a
SourceTable. - Type
- Statement-level type system for values and expressions within Toasty’s query engine.
- Update
Target - The target of an
Updatestatement. - Value
- A dynamically typed value used throughout Toasty’s query engine.
Traits§
- Entry
Path - A path that can be used to navigate into a composite
ValueorExpr. - Input
- Provides runtime argument and reference resolution for expression evaluation and substitution.
- Into
Expr Target - Conversion trait for producing an
ExprTargetfrom 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
ExprContextto look up models, tables, and the model-to-table mapping. - Visit
- Immutable visitor trait for the statement AST.
- Visit
Mut - Mutable visitor trait for the statement AST.