Expand description
Internal SQL AST. Lifts the relevant subset of the libpg_query
protobuf tree into a Rust enum the compiler walks. Statements not
yet supported parse cleanly but compile to
crate::SQLError::Unsupported.
Structs§
- Alter
Sequence - Alter
Table Stmt - CTE
- Column
Def - Create
Foreign Server - Create
Foreign Table - Create
Function CREATE [OR REPLACE] FUNCTION | PROCEDURE.- Create
Index - Create
Sequence - Create
Table - Delete
Stmt - Drop
Function Item - One
DROP FUNCTION/DROP PROCEDUREtarget. - Drop
Function Stmt DROP FUNCTION [IF EXISTS] name[(argtypes)] [, ...]and theDROP PROCEDUREequivalent.- Drop
Stmt - Foreign
Key - Table-level foreign key.
local_columns.len()matchesref_columns.len(); the engine joins on the position-aligned pairs. - Foreign
KeyRef REFERENCES table(column)reference target.- Function
Binding - Function
Param - One declared parameter of a user-defined function or procedure.
- Generated
Column - Insert
Stmt - Join
Using - Locking
Clause - One
PostgreSQLrow-locking clause, including optionalOFtargets and theNOWAIT/SKIP LOCKEDwait policy. - Merge
Stmt - OnConflict
- OrderBy
- Projection
- Returning
Aliases - Routine
Column Type Reference - Structured relation-column identity carried by a routine
%TYPEdeclaration until catalog binding resolves it to a concrete SQL type. - Select
Stmt - SetOp
- Table
Check CHECK (expr)constraint with an optional name (CONSTRAINT <name> CHECK (...)).- Table
Constraint Set - Durable table-level constraints that do not fit in
ColumnDef. - Table
KeyConstraint - A table key whose columns are compared as one tuple.
- Update
Stmt - Window
Frame - Window
Spec
Enums§
- Alter
Table Action - Binary
Op - Column
Type - Discard
Target DISCARDtarget. MirrorsPostgreSQL’sDiscardMode.- Drop
Kind - Expr
- Scalar expression nodes the compiler handles.
- Foreign
KeyAction - Foreign
KeyMatch - Frame
Bound - Frame
Mode - From
Clause - Function
Body - Body of a user-defined routine.
- Function
Param Mode - Parameter mode of a
CREATE FUNCTION/CREATE PROCEDUREargument. MirrorsPostgreSQL’sFunctionParameterMode. - Function
Returns - Declared result shape of a user-defined function.
- Function
Volatility IMMUTABLE/STABLE/VOLATILEmarker.- Generated
Column Kind - Join
Kind - Lock
Strength PostgreSQLrow-lock strength, strongest last.- Lock
Wait - Wait policy for a row-locking clause.
- Merge
When - Nulls
Order - OnConflict
Action - Sequence
Restart - Physical restart action carried by
ALTER SEQUENCE. - SetOp
Kind - Statement
- Table
KeyConstraint Kind - Transaction
Stmt
Functions§
- is_
builtin_ aggregate_ function - Return whether
nameis a built-in aggregate understood by the planner.
Type Aliases§
- Generated
Function Dependency - Value
Expr Exprrestricted to value-producing forms used byINSERTrows.