Skip to main content

Module ast

Module ast 

Source
Expand description

Abstract syntax tree contracts for RadixDB SQL.

Structs§

AliasedExpression
Aliased expression (expr AS alias)
AllAnyExpression
ALL/ANY/SOME subquery expression (e.g., x > ALL (SELECT …))
AlterIndexStatement
ALTER INDEX statement
AlterJobStatement
AlterOwnerStatement
AlterSecuritySubjectStatement
AlterTableStatement
ALTER TABLE statement
AnalyzeStatement
ANALYZE statement for collecting table statistics
AsOfClause
AS OF clause for temporal queries
BeginStatement
BEGIN statement
BetweenExpression
BETWEEN expression
BooleanLiteral
Boolean literal
CallArgumentSyntax
CallStatement
CaseArmSyntax
CaseExpression
CASE expression
CastExpression
CAST expression
ColumnDefinition
Column definition
CommitStatement
COMMIT statement
CommonTableExpression
Common Table Expression
CopyStatement
COPY table [(columns)] FROM ‘file_path’ [WITH (options)]
CreateExtensionStatement
Bind one exact already-installed package to the current database.
CreateExternalTypeStatement
Bind one installed package type descriptor to a schema-qualified SQL name.
CreateIndexStatement
CREATE INDEX statement
CreateJobStatement
CreateOperatorClassStatement
CreateOperatorStatement
CreatePlannerSupportStatement
CreatePrincipalStatement
CreateRoleStatement
CreateRoutineStatement
CreateSchemaStatement
CreateTableStatement
CREATE TABLE statement
CreateTriggerStatement
CreateViewStatement
CREATE VIEW statement
CteReference
CTE reference
DefaultExpression
DEFAULT keyword expression (for INSERT VALUES)
DeleteStatement
DELETE statement
DescribeStatement
DESCRIBE statement - shows table structure or a versioned JSON catalog.
DistinctExpression
DISTINCT expression
DropExtensionStatement
Remove only an extension binding with no dependent catalog objects.
DropExternalTypeStatement
Remove an external SQL type only when it has no dependent objects.
DropIndexStatement
DROP INDEX statement
DropJobStatement
DropOperatorClassStatement
DropOperatorStatement
DropPlannerSupportStatement
DropRoutineStatement
DropSecuritySubjectStatement
DropTableStatement
DROP TABLE statement
DropTriggerStatement
DropViewStatement
DROP VIEW statement
DynamicExecuteSyntax
ExceptionHandlerSyntax
ExistsExpression
EXISTS expression
ExplainStatement
EXPLAIN statement
ExpressionList
Expression list (for IN values)
ExpressionStatement
Expression statement (standalone expression)
FloatLiteral
Float literal
ForeignKeyTableConstraint
Fields for a table-level FOREIGN KEY constraint (boxed to reduce TableConstraint enum size)
FunctionCall
Function call
FunctionTableSource
Function table source (table-valued function in FROM clause) e.g., SELECT * FROM generate_series(1, 10) AS gs(value)
GrantStatement
GroupByClause
GROUP BY clause with optional ROLLUP/CUBE modifier
Identifier
Identifier (column name, table name, etc.)
InExpression
IN expression
InHashSetExpression
Pre-computed IN expression with HashSet for O(1) lookup
InfixExpression
Infix expression (a + b, a = b)
InsertStatement
INSERT statement
IntegerLiteral
Integer literal
IntervalLiteral
INTERVAL literal
JoinTableSource
Join table source
LikeExpression
LIKE expression with optional ESCAPE clause
ListExpression
List expression (for IN clause values)
NativeFunctionBindingSyntax
NullLiteral
NULL literal
ObjectName
OrderByExpression
ORDER BY expression
Parameter
Parameter ($1, ?)
PragmaStatement
PRAGMA statement
PrefixExpression
Prefix expression (-x, NOT x)
PrivilegeSyntax
ProceduralBlock
ProceduralSqlStatement
Program
Program (collection of statements)
QualifiedIdentifier
Qualified identifier or an unresolved multi-part identifier path.
QualifiedOperator
QualifiedStarExpression
Qualified star expression (table.*)
ReleaseSavepointStatement
RELEASE SAVEPOINT statement
ResultColumnSyntax
RevokeStatement
RollbackStatement
ROLLBACK statement
RoutineArgumentSyntax
RoutineSignatureSyntax
SavepointStatement
SAVEPOINT statement
ScalarSubquery
Scalar subquery
SelectStatement
SELECT statement
SetOperation
Set operation combining two SELECT statements
SetStatement
SET statement
ShowCreateTableStatement
SHOW CREATE TABLE statement
ShowCreateViewStatement
SHOW CREATE VIEW statement
ShowIndexesStatement
SHOW INDEXES statement
ShowTablesStatement
SHOW TABLES statement
ShowViewsStatement
SHOW VIEWS statement
SimpleTableSource
Simple table source
SourceRange
StarExpression
Star expression (*)
StringLiteral
String literal
SubqueryTableSource
Subquery table source
TruncateStatement
TRUNCATE TABLE statement
UpdateStatement
UPDATE statement
VacuumStatement
VACUUM statement — triggers manual cleanup of deleted rows and index compaction
ValuesTableSource
VALUES table source (e.g., VALUES (1, ‘a’), (2, ‘b’) AS t(col1, col2))
WhenClause
WHEN clause in CASE expression
WindowDefinition
Named window definition (WINDOW w AS (…))
WindowExpression
Window expression
WindowFrame
Window frame specification
WithClause
WITH clause

Enums§

AllAnyType
ALL/ANY comparison type
AlterSecuritySubjectActionSyntax
AlterTableOperation
ALTER TABLE operation type
AssignmentTargetSyntax
ColumnConstraint
Column constraint
ColumnOrConstraint
Helper enum for parsing - either a column definition or a table constraint
CopyFormat
Copy format for COPY FROM
DescribeFormat
DESCRIBE output representation.
DescribeTarget
DESCRIBE target.
DropBehaviorSyntax
ExceptionPatternSyntax
Expression
Expression enum representing all expression types
ForSourceSyntax
GrantSyntax
GroupByModifier
Group by modifier (ROLLUP, CUBE, GROUPING SETS, or none)
IndexMethod
Index type for USING clause
InfixOperator
Infix operator type (pre-computed at parse time for zero-allocation evaluation) This is a key optimization: instead of string comparison for every row, we match on a small enum which is faster and allocation-free.
JobScheduleSyntax
LoopControlKind
ObjectPrivilegeSyntax
OwnershipTargetSyntax
PrefixOperator
Prefix operator type (pre-computed at parse time)
PrivilegeTargetSyntax
ProceduralDeclaration
ProceduralStatement
ProceduralType
ReturnSyntax
RevokeSyntax
RoutineArgumentMode
RoutineKindSyntax
RoutineReturnSyntax
RoutineSecuritySyntax
RoutineVolatilitySyntax
SecuritySubjectKindSyntax
SetOperationType
Set operation type for compound queries
Statement
Statement enum representing all statement types
TableConstraint
Table-level constraint (applied to the table rather than a single column)
TriggerEventSyntax
TriggerLevelSyntax
TriggerTimingSyntax
WindowFrameBound
Window frame bound
WindowFrameUnit
Window frame unit

Traits§

Node
Node trait - base for all AST nodes