Skip to main content

Statement

Enum Statement 

Source
#[non_exhaustive]
pub enum Statement<X: Extension = NoExt> {
Show 131 variants Query { query: Box<Query<X>>, meta: Meta, }, CreateTable { create: Box<CreateTable<X>>, meta: Meta, }, AlterTable { alter: Box<AlterTable<X>>, meta: Meta, }, Drop { drop: Box<DropStatement>, meta: Meta, }, CreateSchema { schema: Box<CreateSchema<X>>, meta: Meta, }, CreateView { view: Box<CreateView<X>>, meta: Meta, }, RefreshMaterializedView { refresh: Box<RefreshMaterializedView>, meta: Meta, }, CreateColocationGroup { create: Box<CreateColocationGroup>, meta: Meta, }, DropColocationGroup { drop: Box<DropColocationGroup>, meta: Meta, }, AlterView { alter: Box<AlterView<X>>, meta: Meta, }, CreateIndex { index: Box<CreateIndex<X>>, meta: Meta, }, CreateFunction { create: Box<CreateFunction<X>>, meta: Meta, }, CreateProcedure { create: Box<CreateProcedure<X>>, meta: Meta, }, AlterRoutine { alter: Box<AlterRoutine<X>>, meta: Meta, }, CreateEvent { create: Box<CreateEvent<X>>, meta: Meta, }, AlterEvent { alter: Box<AlterEvent<X>>, meta: Meta, }, DropEvent { drop: Box<DropEvent>, meta: Meta, }, DropDatabase { drop: Box<DropDatabase>, meta: Meta, }, DropIndex { drop: Box<DropIndexOnTable>, meta: Meta, }, CreateDatabase { create: Box<CreateDatabase>, meta: Meta, }, DropRoutine { kind: RoutineObjectKind, if_exists: bool, routines: ThinVec<RoutineSignature<X>>, behavior: Option<DropBehavior>, meta: Meta, }, DropTransform { drop: Box<DropTransform<X>>, meta: Meta, }, Truncate { tables: ThinVec<ObjectName>, table_keyword: bool, restart_identity: Option<bool>, behavior: Option<DropBehavior>, meta: Meta, }, CommentOn { comment: Box<CommentOnStatement<X>>, meta: Meta, }, Insert { insert: Box<Insert<X>>, meta: Meta, }, Update { update: Box<Update<X>>, meta: Meta, }, Delete { delete: Box<Delete<X>>, meta: Meta, }, Merge { merge: Box<Merge<X>>, meta: Meta, }, Transaction { transaction: Box<TransactionStatement>, meta: Meta, }, Xa { xa: Box<XaStatement>, meta: Meta, }, Session { session: Box<SessionStatement<X>>, meta: Meta, }, AccessControl { access: Box<AccessControlStatement<X>>, meta: Meta, }, Copy { copy: Box<CopyStatement<X>>, meta: Meta, }, CopyInto { copy: Box<CopyIntoStatement<X>>, meta: Meta, }, Export { export: Box<ExportStatement>, meta: Meta, }, Import { import: Box<ImportStatement>, meta: Meta, }, Explain { explain: Box<ExplainStatement<X>>, meta: Meta, }, Describe { describe: Box<DescribeStatement>, meta: Meta, }, Show { show: Box<ShowStatement<X>>, meta: Meta, }, Kill { kill: Box<KillStatement<X>>, meta: Meta, }, Handler { handler: Box<HandlerStatement<X>>, meta: Meta, }, Install { install: Box<InstallStatement<X>>, meta: Meta, }, Uninstall { uninstall: Box<UninstallStatement>, meta: Meta, }, Shutdown { meta: Meta, }, Restart { meta: Meta, }, Clone { clone: Box<CloneStatement>, meta: Meta, }, ImportTable { import_table: Box<ImportTableStatement>, meta: Meta, }, Help { help: Box<HelpStatement>, meta: Meta, }, Binlog { binlog: Box<BinlogStatement>, meta: Meta, }, Pragma { pragma: Box<PragmaStatement>, meta: Meta, }, Attach { attach: Box<AttachStatement<X>>, meta: Meta, }, Detach { detach: Box<DetachStatement>, meta: Meta, }, Checkpoint { checkpoint: Box<CheckpointStatement>, meta: Meta, }, Load { load: Box<LoadStatement>, meta: Meta, }, LoadData { load_data: Box<LoadDataStatement<X>>, meta: Meta, }, UpdateExtensions { update_extensions: Box<UpdateExtensionsStatement>, meta: Meta, }, Vacuum { vacuum: Box<VacuumStatement<X>>, meta: Meta, }, Reindex { reindex: Box<ReindexStatement>, meta: Meta, }, Analyze { analyze: Box<AnalyzeStatement>, meta: Meta, }, TableMaintenance { table_maintenance: Box<TableMaintenanceStatement>, meta: Meta, }, CacheIndex { cache_index: Box<CacheIndexStatement>, meta: Meta, }, LoadIndex { load_index: Box<LoadIndexStatement>, meta: Meta, }, Rename { rename: Box<RenameStatement>, meta: Meta, }, Flush { flush: Box<FlushStatement>, meta: Meta, }, Purge { purge: Box<PurgeStatement<X>>, meta: Meta, }, Replication { replication: Box<ReplicationStatement>, meta: Meta, }, CreateUser { create: Box<CreateUser>, meta: Meta, }, AlterUser { alter: Box<AlterUser>, meta: Meta, }, UserRoleList { statement: Box<UserRoleList>, meta: Meta, }, Use { use_statement: Box<UseStatement>, meta: Meta, }, CreateTrigger { create: Box<CreateTrigger<X>>, meta: Meta, }, CreateStoredTrigger { create: Box<CreateStoredTrigger<X>>, meta: Meta, }, CreateMacro { create: Box<CreateMacro<X>>, meta: Meta, }, CreateSecret { create: Box<CreateSecret<X>>, meta: Meta, }, DropSecret { drop: Box<DropSecretStmt>, meta: Meta, }, CreateType { create: Box<CreateType<X>>, meta: Meta, }, CreateVirtualTable { create: Box<CreateVirtualTable>, meta: Meta, }, CreateSequence { create: Box<CreateSequence<X>>, meta: Meta, }, CreateExtension { create: Box<CreateExtension>, meta: Meta, }, AlterExtension { alter: Box<AlterExtension<X>>, meta: Meta, }, CreateTablespace { create: Box<CreateTablespace>, meta: Meta, }, AlterTablespace { alter: Box<AlterTablespace>, meta: Meta, }, DropTablespace { drop: Box<DropTablespace>, meta: Meta, }, CreateLogfileGroup { create: Box<CreateLogfileGroup>, meta: Meta, }, AlterLogfileGroup { alter: Box<AlterLogfileGroup>, meta: Meta, }, DropLogfileGroup { drop: Box<DropLogfileGroup>, meta: Meta, }, AlterObjectDepends { alter: Box<AlterObjectDepends<X>>, meta: Meta, }, AlterSystem { alter: Box<AlterSystem>, meta: Meta, }, AlterDatabase { alter: Box<AlterDatabase>, meta: Meta, }, AlterDatabaseOptions { alter: Box<AlterDatabaseOptions>, meta: Meta, }, CreateServer { create: Box<CreateServer>, meta: Meta, }, AlterServer { alter: Box<AlterServer>, meta: Meta, }, DropServer { drop: Box<DropServer>, meta: Meta, }, AlterInstance { alter: Box<AlterInstance>, meta: Meta, }, CreateSpatialReferenceSystem { create: Box<CreateSpatialReferenceSystem>, meta: Meta, }, DropSpatialReferenceSystem { drop: Box<DropSpatialReferenceSystem>, meta: Meta, }, CreateResourceGroup { create: Box<CreateResourceGroup>, meta: Meta, }, AlterResourceGroup { alter: Box<AlterResourceGroup>, meta: Meta, }, DropResourceGroup { drop: Box<DropResourceGroup>, meta: Meta, }, AlterSequence { alter: Box<AlterSequence<X>>, meta: Meta, }, AlterObjectSchema { alter: Box<AlterObjectSchema>, meta: Meta, }, Pivot { pivot: Box<Pivot<X>>, meta: Meta, }, Unpivot { unpivot: Box<Unpivot<X>>, meta: Meta, }, ShowRef { show: Box<ShowRef<X>>, meta: Meta, }, Prepare { prepare: Box<PrepareStatement<X>>, meta: Meta, }, Execute { execute: Box<ExecuteStatement<X>>, meta: Meta, }, PrepareFrom { prepare_from: Box<PrepareFromStatement>, meta: Meta, }, ExecuteUsing { execute_using: Box<ExecuteUsingStatement>, meta: Meta, }, Deallocate { deallocate: Box<DeallocateStatement>, meta: Meta, }, Call { call: Box<CallStatement<X>>, meta: Meta, }, Do { do_block: Box<DoStatement>, meta: Meta, }, DoExpressions { do_expressions: Box<DoExpressionsStatement<X>>, meta: Meta, }, LockTables { lock_tables: Box<LockTablesStatement>, meta: Meta, }, UnlockTables { unlock_tables: Box<UnlockTablesStatement>, meta: Meta, }, InstanceLock { instance_lock: Box<InstanceLockStatement>, meta: Meta, }, Compound { compound: Box<CompoundStatement<X>>, meta: Meta, }, If { if_statement: Box<IfStatement<X>>, meta: Meta, }, Case { case_statement: Box<CaseStatement<X>>, meta: Meta, }, Loop { loop_statement: Box<LoopStatement<X>>, meta: Meta, }, While { while_statement: Box<WhileStatement<X>>, meta: Meta, }, Repeat { repeat: Box<RepeatStatement<X>>, meta: Meta, }, Leave { leave: Box<LeaveStatement>, meta: Meta, }, Iterate { iterate: Box<IterateStatement>, meta: Meta, }, Return { return_statement: Box<ReturnStatement<X>>, meta: Meta, }, OpenCursor { open: Box<OpenCursorStatement>, meta: Meta, }, FetchCursor { fetch: Box<FetchCursorStatement>, meta: Meta, }, CloseCursor { close: Box<CloseCursorStatement>, meta: Meta, }, Signal { signal: Box<SignalStatement<X>>, meta: Meta, }, Resignal { resignal: Box<SignalStatement<X>>, meta: Meta, }, GetDiagnostics { get_diagnostics: Box<GetDiagnosticsStatement<X>>, meta: Meta, }, Other { ext: X, meta: Meta, },
}
Expand description

The SQL statement forms represented by the AST.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Query

A SELECT / query statement.

Fields

§query: Box<Query<X>>

Query governed by this node.

§meta: Meta

Source location and node identity.

§

CreateTable

A CREATE TABLE statement.

Fields

§create: Box<CreateTable<X>>

The CREATE TABLE details; see CreateTable.

§meta: Meta

Source location and node identity.

§

AlterTable

An ALTER TABLE statement.

Fields

§alter: Box<AlterTable<X>>

The ALTER TABLE details; see AlterTable.

§meta: Meta

Source location and node identity.

§

Drop

A DROP statement.

Fields

§drop: Box<DropStatement>

The DROP details; see DropStatement.

§meta: Meta

Source location and node identity.

§

CreateSchema

A CREATE SCHEMA statement.

Fields

§schema: Box<CreateSchema<X>>

The CREATE SCHEMA details; see CreateSchema.

§meta: Meta

Source location and node identity.

§

CreateView

A CREATE VIEW statement.

Fields

§view: Box<CreateView<X>>

The CREATE VIEW details; see CreateView.

§meta: Meta

Source location and node identity.

§

RefreshMaterializedView

Refresh a materialized view, including PostgreSQL’s optional execution modifiers.

Fields

§refresh: Box<RefreshMaterializedView>

Refresh details.

§meta: Meta

Source location and node identity.

§

CreateColocationGroup

Create a colocation group.

Fields

§create: Box<CreateColocationGroup>

Statement details.

§meta: Meta

Source location and node identity.

§

DropColocationGroup

Drop a colocation group.

Fields

§drop: Box<DropColocationGroup>

Statement details.

§meta: Meta

Source location and node identity.

§

AlterView

A MySQL ALTER [ALGORITHM = …] [DEFINER = …] [SQL SECURITY …] VIEW … statement — the view redefinition, kept apart from AlterTable and the DuckDB ALTER … SET SCHEMA relocation. Boxed to keep the enum within its size budget.

Fields

§alter: Box<AlterView<X>>

The ALTER VIEW details; see AlterView.

§meta: Meta

Source location and node identity.

§

CreateIndex

A CREATE INDEX statement.

Fields

§index: Box<CreateIndex<X>>

The CREATE INDEX details; see CreateIndex.

§meta: Meta

Source location and node identity.

§

CreateFunction

A CREATE [OR REPLACE] FUNCTION statement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateFunction<X>>

The CREATE FUNCTION details; see CreateFunction.

§meta: Meta

Source location and node identity.

§

CreateProcedure

A MySQL CREATE [DEFINER = …] PROCEDURE … statement — the stored-procedure definition, kept apart from CreateFunction (no RETURNS, a CALL-invoked body that rejects RETURN). Boxed to keep the enum within its size budget.

Fields

§create: Box<CreateProcedure<X>>

The CREATE PROCEDURE details; see CreateProcedure.

§meta: Meta

Source location and node identity.

§

AlterRoutine

A MySQL ALTER {PROCEDURE | FUNCTION} <name> [<characteristic> …] statement — the routine-characteristics alteration (no body). Boxed to keep the enum within its size budget.

Fields

§alter: Box<AlterRoutine<X>>

The ALTER PROCEDURE/ALTER FUNCTION details; see AlterRoutine.

§meta: Meta

Source location and node identity.

§

CreateEvent

A MySQL CREATE [DEFINER = …] EVENT … statement — the scheduled-event definition. Boxed to keep the enum within its size budget.

Fields

§create: Box<CreateEvent<X>>

The CREATE EVENT details; see CreateEvent.

§meta: Meta

Source location and node identity.

§

AlterEvent

A MySQL ALTER [DEFINER = …] EVENT … statement — the scheduled-event alteration. Boxed to keep the enum within its size budget.

Fields

§alter: Box<AlterEvent<X>>

The ALTER EVENT details; see AlterEvent.

§meta: Meta

Source location and node identity.

§

DropEvent

A MySQL DROP EVENT [IF EXISTS] <name> statement — kept apart from Drop because an event drop names exactly one event and takes no CASCADE/RESTRICT. Boxed to keep the enum within its size budget.

Fields

§drop: Box<DropEvent>

The DROP EVENT details; see DropEvent.

§meta: Meta

Source location and node identity.

§

DropDatabase

A MySQL DROP {DATABASE | SCHEMA} [IF EXISTS] <name> statement — kept apart from Drop because it names exactly one unqualified database and takes no CASCADE/RESTRICT, and because DATABASE/SCHEMA are synonyms here (unlike the shared name-list DROP SCHEMA). Boxed to keep the enum within its size budget.

Fields

§drop: Box<DropDatabase>

The DROP DATABASE/DROP SCHEMA details; see DropDatabase.

§meta: Meta

Source location and node identity.

§

DropIndex

A MySQL DROP INDEX <name> ON <table> [ALGORITHM …] [LOCK …] statement — kept apart from Drop because it names the owning table with a mandatory ON and carries the online-DDL ALGORITHM/LOCK hints. Boxed to keep the enum within its size budget.

Fields

§drop: Box<DropIndexOnTable>

The DROP INDEX … ON … details; see DropIndexOnTable.

§meta: Meta

Source location and node identity.

§

CreateDatabase

A CREATE DATABASE statement.

Fields

§create: Box<CreateDatabase>

The CREATE DATABASE details; see CreateDatabase.

§meta: Meta

Source location and node identity.

§

DropRoutine

A DROP {FUNCTION | PROCEDURE | ROUTINE} <signature> [, ...] statement — the routine drop, kept apart from Drop because a routine is named by an argument-type signature (RoutineSignature), not a plain name.

Fields

§kind: RoutineObjectKind

Which routine kind is dropped (FUNCTION/PROCEDURE/ROUTINE); see RoutineObjectKind.

§if_exists: bool

Whether the if exists form was present in the source.

§routines: ThinVec<RoutineSignature<X>>

routines in source order.

§behavior: Option<DropBehavior>

Optional behavior for this syntax.

§meta: Meta

Source location and node identity.

§

DropTransform

A PostgreSQL DROP TRANSFORM [IF EXISTS] FOR <type> LANGUAGE <lang> [CASCADE | RESTRICT] statement (DropTransformStmt), kept apart from Drop because a transform is named by a (type, language) pair (an ObjectReference::Transform), not a plain name list. Gated by StatementDdlGates::transform_ddl. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§drop: Box<DropTransform<X>>

The DROP TRANSFORM details; see DropTransform.

§meta: Meta

Source location and node identity.

§

Truncate

A TRUNCATE [TABLE] <name> [, ...] [RESTART IDENTITY | CONTINUE IDENTITY] [CASCADE | RESTRICT] statement. Standard SQL:2008 (F200) and accepted by every shipped dialect, so it carries no FeatureSet gate. The optional TABLE keyword is exact-synonym sugar; a table_keyword tag records whether it was written so a source-fidelity render replays it (the canonical render emits TRUNCATE TABLE). Inline-field, like DropRoutine: a table list plus its flags carries no expressions or extension nodes.

Fields

§tables: ThinVec<ObjectName>

Tables in source order.

§table_keyword: bool

Whether the optional TABLE keyword was written (TRUNCATE TABLE t vs the bare TRUNCATE t). Fidelity only; the canonical render emits TABLE.

§restart_identity: Option<bool>

Some(true) = RESTART IDENTITY, Some(false) = CONTINUE IDENTITY, None = neither clause written. PostgreSQL collapses the absent and CONTINUE forms (both leave sequences untouched); the tag keeps them distinct so they round-trip.

§behavior: Option<DropBehavior>

Optional behavior for this syntax.

§meta: Meta

Source location and node identity.

§

CommentOn

A COMMENT ON <object> IS '<text>' | NULL object-metadata statement (PostgreSQL-specific; gated by UtilitySyntax::comment_on). Boxed, like the other family payloads, to keep the enum within its size budget; the fields live on CommentOnStatement.

Fields

§comment: Box<CommentOnStatement<X>>

The COMMENT ON details; see CommentOnStatement.

§meta: Meta

Source location and node identity.

§

Insert

An INSERT statement.

Fields

§insert: Box<Insert<X>>

The INSERT details; see Insert.

§meta: Meta

Source location and node identity.

§

Update

An UPDATE statement.

Fields

§update: Box<Update<X>>

The UPDATE details; see Update.

§meta: Meta

Source location and node identity.

§

Delete

A DELETE statement.

Fields

§delete: Box<Delete<X>>

The DELETE details; see Delete.

§meta: Meta

Source location and node identity.

§

Merge

A MERGE INTO ... USING ... WHEN [NOT] MATCHED ... statement (SQL:2003). Boxed, like the other DML payloads, to keep the enum within its size budget.

Fields

§merge: Box<Merge<X>>

The MERGE details; see Merge.

§meta: Meta

Source location and node identity.

§

Transaction

A transaction-control statement (BEGIN/COMMIT/ROLLBACK/…). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§transaction: Box<TransactionStatement>

The transaction-control details (BEGIN/COMMIT/…); see TransactionStatement.

§meta: Meta

Source location and node identity.

§

Xa

A MySQL XA distributed-transaction statement (gated by UtilitySyntax::xa_transactions) — the X/Open XA two-phase-commit verbs, a family distinct from the ANSI Transaction control statements. Boxed, like the other family payloads, to keep the enum within its size budget; see XaStatement.

Fields

§xa: Box<XaStatement>

The XA statement details; see XaStatement.

§meta: Meta

Source location and node identity.

§

Session

A session statement (SET/RESET/SET ROLE/…).

Fields

§session: Box<SessionStatement<X>>

The session SET/RESET details; see SessionStatement.

§meta: Meta

Source location and node identity.

§

AccessControl

A GRANT/REVOKE access-control statement.

Fields

§access: Box<AccessControlStatement<X>>

The GRANT/REVOKE details; see AccessControlStatement.

§meta: Meta

Source location and node identity.

§

Copy

A COPY statement.

Fields

§copy: Box<CopyStatement<X>>

The COPY details; see CopyStatement.

§meta: Meta

Source location and node identity.

§

CopyInto

A Snowflake COPY INTO <target> FROM <source> ... bulk load/unload statement (gated by UtilitySyntax::copy_into). A sibling of Copy rather than a variant of it — the two share only the COPY keyword; see CopyIntoStatement.

Fields

§copy: Box<CopyIntoStatement<X>>

The COPY INTO details; see CopyIntoStatement.

§meta: Meta

Source location and node identity.

§

Export

A DuckDB EXPORT DATABASE ['<db>' TO] '<path>' [<opts>] catalogue-dump statement (gated — with its Import inverse — by UtilitySyntax::export_import_database). First-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget; see ExportStatement.

Fields

§export: Box<ExportStatement>

The EXPORT DATABASE details; see ExportStatement.

§meta: Meta

Source location and node identity.

§

Import

A DuckDB IMPORT DATABASE '<path>' catalogue-replay statement — the Export inverse, sharing its gate; see ImportStatement.

Fields

§import: Box<ImportStatement>

The IMPORT DATABASE details; see ImportStatement.

§meta: Meta

Source location and node identity.

§

Explain

An EXPLAIN / EXPLAIN ANALYZE query-plan statement (also spelled DESCRIBE / DESC under MySQL — the spelling tag records which).

Fields

§explain: Box<ExplainStatement<X>>

The EXPLAIN details; see ExplainStatement.

§meta: Meta

Source location and node identity.

§

Describe

A MySQL {DESCRIBE | DESC | EXPLAIN} <table> [<column> | '<pattern>'] table-metadata statement (gated by ShowSyntax::describe); the MySQL overload of the EXPLAIN keyword that describes a table rather than planning a query. First-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§describe: Box<DescribeStatement>

The DESCRIBE details; see DescribeStatement.

§meta: Meta

Source location and node identity.

§

Show

A typed SHOW TABLES catalogue-listing statement (MySQL/DuckDB; gated by ShowSyntax::show_tables) — distinct from the generic session SHOW <var> (Session). Opener of the typed-SHOW family; first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget; the fields live on ShowStatement.

Fields

§show: Box<ShowStatement<X>>

The SHOW details; see ShowStatement.

§meta: Meta

Source location and node identity.

§

Kill

A MySQL KILL [CONNECTION | QUERY] <id> thread/query-termination statement (gated by UtilitySyntax::kill); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§kill: Box<KillStatement<X>>

The KILL details; see KillStatement.

§meta: Meta

Source location and node identity.

§

Handler

A MySQL HANDLER low-level cursor statement — OPEN/READ/CLOSE direct storage-engine access (gated by UtilitySyntax::handler_statements); see HandlerStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§handler: Box<HandlerStatement<X>>

The HANDLER details; see HandlerStatement.

§meta: Meta

Source location and node identity.

§

Install

A MySQL INSTALL PLUGIN/INSTALL COMPONENT server-administration statement (gated by UtilitySyntax::plugin_component_statements); see InstallStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§install: Box<InstallStatement<X>>

The INSTALL details; see InstallStatement.

§meta: Meta

Source location and node identity.

§

Uninstall

A MySQL UNINSTALL PLUGIN/UNINSTALL COMPONENT server-administration statement, the inverse of Install (gated by the same UtilitySyntax::plugin_component_statements); see UninstallStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§uninstall: Box<UninstallStatement>

The UNINSTALL details; see UninstallStatement.

§meta: Meta

Source location and node identity.

§

Shutdown

A MySQL SHUTDOWN server-shutdown statement (gated by UtilitySyntax::shutdown) — a nullary leading keyword with no operand (SHUTDOWN 1 is ER_PARSE_ERROR on mysql:8), so it carries no payload node.

Fields

§meta: Meta

Source location and node identity.

§

Restart

A MySQL RESTART server-restart statement (gated by UtilitySyntax::restart) — a nullary leading keyword with no operand (RESTART 1 is ER_PARSE_ERROR on mysql:8), so it carries no payload node.

Fields

§meta: Meta

Source location and node identity.

§

Clone

A MySQL CLONE local/remote data-directory provisioning statement (gated by UtilitySyntax::clone); see CloneStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§clone: Box<CloneStatement>

The CLONE details; see CloneStatement.

§meta: Meta

Source location and node identity.

§

ImportTable

A MySQL IMPORT TABLE FROM '<file>' [, …] tablespace-import statement (gated by UtilitySyntax::import_table); see ImportTableStatement. Distinct from the DuckDB IMPORT DATABASE (Import). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§import_table: Box<ImportTableStatement>

The IMPORT TABLE details; see ImportTableStatement.

§meta: Meta

Source location and node identity.

§

Help

A MySQL HELP '<topic>' help-lookup statement (gated by UtilitySyntax::help_statement); see HelpStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§help: Box<HelpStatement>

The HELP details; see HelpStatement.

§meta: Meta

Source location and node identity.

§

Binlog

A MySQL BINLOG '<base64-event>' binary-log-event replay statement (gated by UtilitySyntax::binlog); see BinlogStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§binlog: Box<BinlogStatement>

The BINLOG details; see BinlogStatement.

§meta: Meta

Source location and node identity.

§

Pragma

A SQLite PRAGMA configuration statement (gated by UtilitySyntax::pragma). A first-class variant rather than an Other extension because the shipped builtin dialects are NoExt — the Other(X) seam is reachable only by an out-of-tree dialect with its own Ext, never by a builtin. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§pragma: Box<PragmaStatement>

The PRAGMA details; see PragmaStatement.

§meta: Meta

Source location and node identity.

§

Attach

A SQLite ATTACH [DATABASE] <expr> AS <schema> statement (gated by UtilitySyntax::attach); first-class for the same builtin-blind-seam reason as Pragma.

Fields

§attach: Box<AttachStatement<X>>

The ATTACH details; see AttachStatement.

§meta: Meta

Source location and node identity.

§

Detach

A DETACH [DATABASE] [IF EXISTS] <schema> statement — the Attach inverse, sharing its gate.

Fields

§detach: Box<DetachStatement>

The DETACH details; see DetachStatement.

§meta: Meta

Source location and node identity.

§

Checkpoint

A [FORCE] CHECKPOINT [<database>] write-ahead-log flush statement (PostgreSQL/DuckDB; gated by MaintenanceSyntax::checkpoint). First-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§checkpoint: Box<CheckpointStatement>

The CHECKPOINT details; see CheckpointStatement.

§meta: Meta

Source location and node identity.

§

Load

A LOAD <extension> extension/shared-library load statement (PostgreSQL/DuckDB; gated by UtilitySyntax::load_extension). First-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§load: Box<LoadStatement>

The LOAD details; see LoadStatement.

§meta: Meta

Source location and node identity.

§

LoadData

A MySQL LOAD {DATA | XML} … INFILE … INTO TABLE … bulk-import statement (gated by UtilitySyntax::load_data) — a DIFFERENT behaviour on the leading LOAD keyword from PostgreSQL/DuckDB’s extension Load form (the two gates are never both armed in one preset, dispatched on the two-word LOAD DATA/LOAD XML lookahead); see LoadDataStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§load_data: Box<LoadDataStatement<X>>

The LOAD DATA/LOAD XML details; see LoadDataStatement.

§meta: Meta

Source location and node identity.

§

UpdateExtensions

A DuckDB UPDATE EXTENSIONS [( <name>, ... )] extension-refresh statement (gated by UtilitySyntax::update_extensions); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§update_extensions: Box<UpdateExtensionsStatement>

The UPDATE EXTENSIONS details; see UpdateExtensionsStatement.

§meta: Meta

Source location and node identity.

§

Vacuum

A SQLite VACUUM [<schema>] [INTO <expr>] maintenance statement (gated by MaintenanceSyntax::vacuum); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§vacuum: Box<VacuumStatement<X>>

The VACUUM details; see VacuumStatement.

§meta: Meta

Source location and node identity.

§

Reindex

A SQLite REINDEX [<name>] index-rebuild statement (gated by MaintenanceSyntax::reindex).

Fields

§reindex: Box<ReindexStatement>

The REINDEX details; see ReindexStatement.

§meta: Meta

Source location and node identity.

§

Analyze

A SQLite ANALYZE [<name>] statistics statement (gated by MaintenanceSyntax::analyze).

Fields

§analyze: Box<AnalyzeStatement>

The ANALYZE details; see AnalyzeStatement.

§meta: Meta

Source location and node identity.

§

TableMaintenance

A MySQL admin-table maintenance statement {ANALYZE | CHECK | CHECKSUM | OPTIMIZE | REPAIR} {TABLE | TABLES} <list> [options] (gated by MaintenanceSyntax::table_maintenance). Distinct from the SQLite Analyze leading-ANALYZE statement: MySQL’s ANALYZE always takes TABLE, so the dispatch reserves the bare form for the SQLite/DuckDB sibling. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§table_maintenance: Box<TableMaintenanceStatement>

The maintenance details; see TableMaintenanceStatement.

§meta: Meta

Source location and node identity.

§

CacheIndex

A MySQL CACHE INDEX <t> [<keys>][, ...] [PARTITION (...)] IN <cache> statement — assign a table’s indexes to a named key cache (gated by UtilitySyntax::key_cache_statements); see CacheIndexStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§cache_index: Box<CacheIndexStatement>

The CACHE INDEX details; see CacheIndexStatement.

§meta: Meta

Source location and node identity.

§

LoadIndex

A MySQL LOAD INDEX INTO CACHE <t> [PARTITION (...)] [<keys>] [IGNORE LEAVES][, ...] statement — preload a table’s index blocks into its key cache; the CacheIndex preload sibling, sharing the key_cache_statements gate. See LoadIndexStatement. Distinct from the LOAD <extension> Load statement (a different grammar and gate). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§load_index: Box<LoadIndexStatement>

The LOAD INDEX INTO CACHE details; see LoadIndexStatement.

§meta: Meta

Source location and node identity.

§

Rename

A MySQL standalone RENAME TABLE/RENAME USER object-rename statement (gated by UtilitySyntax::rename_statement); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§rename: Box<RenameStatement>

The RENAME details; see RenameStatement.

§meta: Meta

Source location and node identity.

§

Flush

A MySQL FLUSH [NO_WRITE_TO_BINLOG | LOCAL] <target> server-administration statement (gated by UtilitySyntax::flush); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§flush: Box<FlushStatement>

The FLUSH details; see FlushStatement.

§meta: Meta

Source location and node identity.

§

Purge

A MySQL PURGE BINARY LOGS {TO '<log>' | BEFORE <datetime>} binary-log purge statement (gated by UtilitySyntax::purge_binary_logs); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§purge: Box<PurgeStatement<X>>

The PURGE details; see PurgeStatement.

§meta: Meta

Source location and node identity.

§

Replication

A MySQL replication-administration statement (gated by UtilitySyntax::replication_statements) — CHANGE REPLICATION SOURCE/FILTER, START/STOP REPLICA, and START/STOP GROUP_REPLICATION. Boxed, like the other family payloads, to keep the enum within its size budget; see ReplicationStatement.

Fields

§replication: Box<ReplicationStatement>

The replication-statement details; see ReplicationStatement.

§meta: Meta

Source location and node identity.

§

CreateUser

A MySQL CREATE USER … account-creation statement (gated by AccessControlSyntax::user_role_management). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateUser>

The account-creation details; see CreateUser.

§meta: Meta

Source location and node identity.

§

AlterUser

A MySQL ALTER USER … account-modification statement (gated by AccessControlSyntax::user_role_management). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterUser>

The account-modification details; see AlterUser.

§meta: Meta

Source location and node identity.

§

UserRoleList

A MySQL DROP USER / CREATE ROLE / DROP ROLE account-or-role-list statement (gated by AccessControlSyntax::user_role_management) — the three verbs share one UserRoleList node with the verb carried as data. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§statement: Box<UserRoleList>

The verb, existence guard, and name list; see UserRoleList.

§meta: Meta

Source location and node identity.

§

Use

A DuckDB USE <catalog> [. <schema>] catalog/schema-switch statement (gated by UtilitySyntax::use_statement); first-class for the same builtin-blind-seam reason as Pragma.

Fields

§use_statement: Box<UseStatement>

The USE details; see UseStatement.

§meta: Meta

Source location and node identity.

§

CreateTrigger

A SQLite CREATE [TEMP] TRIGGER ... BEGIN ... END statement (gated by StatementDdlGates::create_trigger). Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateTrigger<X>>

The CREATE TRIGGER details; see CreateTrigger.

§meta: Meta

Source location and node identity.

§

CreateStoredTrigger

A MySQL CREATE [DEFINER = …] TRIGGER … FOR EACH ROW <sp_proc_stmt> statement — the stored-program (SQL/PSM) trigger, kept apart from the SQLite CreateTrigger whose body is a BEGIN <stmt>; … END list of plain SQL statements. Boxed to keep the enum within its size budget.

Fields

§create: Box<CreateStoredTrigger<X>>

The MySQL CREATE TRIGGER details; see CreateStoredTrigger.

§meta: Meta

Source location and node identity.

§

CreateMacro

A DuckDB CREATE [OR REPLACE] [TEMP] {MACRO | FUNCTION} <name>(<params>) AS <expr> | AS TABLE <query> statement (gated by StatementDdlGates::create_macro). A live-body macro, kept apart from CreateFunction whose body is an opaque routine string. Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateMacro<X>>

The CREATE MACRO details; see CreateMacro.

§meta: Meta

Source location and node identity.

§

CreateSecret

A DuckDB CREATE [PERSISTENT] SECRET <name> (<option> <value>, …) secrets-management statement (gated by StatementDdlGates::create_secret). Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateSecret<X>>

The CREATE SECRET details; see CreateSecret.

§meta: Meta

Source location and node identity.

§

DropSecret

A DuckDB DROP [PERSISTENT | TEMPORARY] SECRET [IF EXISTS] <name> [FROM <storage>] secrets-management statement (gated by StatementDdlGates::create_secret, the same flag that admits Self::CreateSecret). Its own statement — not a Self::Drop object kind — because drop_secret.y carries the persistence modifier and FROM <storage> selector the shared name-list DROP grammar lacks. Boxed, like the other DDL payloads, to keep the enum within its size budget.

Fields

§drop: Box<DropSecretStmt>

The DROP SECRET details; see DropSecretStmt.

§meta: Meta

Source location and node identity.

§

CreateType

A DuckDB CREATE [OR REPLACE] [TEMP] TYPE <name> AS ENUM(…)/STRUCT(…)/<alias> user-defined-type statement (gated by StatementDdlGates::create_type). Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateType<X>>

The CREATE TYPE details; see CreateType.

§meta: Meta

Source location and node identity.

§

CreateVirtualTable

A SQLite CREATE VIRTUAL TABLE [IF NOT EXISTS] <name> USING <module> [(<args>)] statement (gated by StatementDdlGates::create_virtual_table). Boxed, like the other CREATE payloads, to keep the enum within its size budget. The payload is non-generic — a virtual table’s module arguments are opaque verbatim text, carrying no expressions or extension nodes.

Fields

§create: Box<CreateVirtualTable>

The CREATE VIRTUAL TABLE details; see CreateVirtualTable.

§meta: Meta

Source location and node identity.

§

CreateSequence

A CREATE [TEMPORARY] SEQUENCE [IF NOT EXISTS] <name> [<option> ...] sequence generator (SQL:2003 T176; PostgreSQL/DuckDB), gated by StatementDdlGates::create_sequence. One shared node gated per-dialect (ADR-0011), not parallel engine nodes: both engines’ parsers accept the same standard option core. Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateSequence<X>>

The CREATE SEQUENCE details; see CreateSequence.

§meta: Meta

Source location and node identity.

§

CreateExtension

A PostgreSQL CREATE EXTENSION [IF NOT EXISTS] <name> [WITH] [SCHEMA s] [VERSION v] [CASCADE] statement (gated by StatementDdlGates::extension_ddl). Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateExtension>

The CREATE EXTENSION details; see CreateExtension.

§meta: Meta

Source location and node identity.

§

AlterExtension

A PostgreSQL ALTER EXTENSION <name> {UPDATE [TO v] | ADD <member> | DROP <member>} statement, sharing the extension-DDL gate with CreateExtension. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterExtension<X>>

The ALTER EXTENSION details; see AlterExtension.

§meta: Meta

Source location and node identity.

§

CreateTablespace

A MySQL CREATE [UNDO] TABLESPACE <name> … NDB/InnoDB storage-DDL statement (gated by StatementDdlGates::tablespace_ddl); see CreateTablespace. Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateTablespace>

The CREATE TABLESPACE details; see CreateTablespace.

§meta: Meta

Source location and node identity.

§

AlterTablespace

A MySQL ALTER [UNDO] TABLESPACE <name> <action> statement, sharing the tablespace-DDL gate with CreateTablespace; see AlterTablespace. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterTablespace>

The ALTER TABLESPACE details; see AlterTablespace.

§meta: Meta

Source location and node identity.

§

DropTablespace

A MySQL DROP [UNDO] TABLESPACE <name> [<option>...] statement, sharing the tablespace-DDL gate with CreateTablespace; see DropTablespace. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§drop: Box<DropTablespace>

The DROP TABLESPACE details; see DropTablespace.

§meta: Meta

Source location and node identity.

§

CreateLogfileGroup

A MySQL CREATE LOGFILE GROUP <name> ADD UNDOFILE '<f>' [<option>...] NDB storage-DDL statement (gated by StatementDdlGates::logfile_group_ddl); see CreateLogfileGroup. Boxed, like the other CREATE payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateLogfileGroup>

The CREATE LOGFILE GROUP details; see CreateLogfileGroup.

§meta: Meta

Source location and node identity.

§

AlterLogfileGroup

A MySQL ALTER LOGFILE GROUP <name> ADD UNDOFILE '<f>' [<option>...] statement, sharing the logfile-group-DDL gate with CreateLogfileGroup; see AlterLogfileGroup. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterLogfileGroup>

The ALTER LOGFILE GROUP details; see AlterLogfileGroup.

§meta: Meta

Source location and node identity.

§

DropLogfileGroup

A MySQL DROP LOGFILE GROUP <name> [<option>...] statement, sharing the logfile-group-DDL gate with CreateLogfileGroup; see DropLogfileGroup. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§drop: Box<DropLogfileGroup>

The DROP LOGFILE GROUP details; see DropLogfileGroup.

§meta: Meta

Source location and node identity.

§

AlterObjectDepends

A PostgreSQL ALTER <object> [NO] DEPENDS ON EXTENSION <extension> statement (AlterObjectDependsStmt), sharing the extension-DDL gate with CreateExtension. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterObjectDepends<X>>

The ALTER … DEPENDS ON EXTENSION details; see AlterObjectDepends.

§meta: Meta

Source location and node identity.

§

AlterSystem

A PostgreSQL ALTER SYSTEM { SET <name> {= | TO} <value> | RESET <name> | RESET ALL } server-configuration statement (AlterSystemStmt), gated by StatementDdlGates::alter_system. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterSystem>

The ALTER SYSTEM details; see AlterSystem.

§meta: Meta

Source location and node identity.

§

AlterDatabase

DuckDB’s ALTER DATABASE [IF EXISTS] <name> SET ALIAS TO <alias> statement (AlterDatabaseStmt), gated by StatementDdlGates::alter_database. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterDatabase>

The ALTER DATABASE details; see AlterDatabase.

§meta: Meta

Source location and node identity.

§

AlterDatabaseOptions

MySQL’s ALTER {DATABASE | SCHEMA} [<name>] <option> … schema-option change (alter_database_stmt), gated by StatementDdlGates::alter_database_options; see AlterDatabaseOptions. A distinct node and gate from DuckDB’s AlterDatabase SET ALIAS relocation. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterDatabaseOptions>

The ALTER {DATABASE | SCHEMA} option-change details; see AlterDatabaseOptions.

§meta: Meta

Source location and node identity.

§

CreateServer

MySQL’s CREATE SERVER <name> FOREIGN DATA WRAPPER <wrapper> OPTIONS ( … ) federated-server definition, gated by StatementDdlGates::server_definition; see CreateServer. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateServer>

The CREATE SERVER details; see CreateServer.

§meta: Meta

Source location and node identity.

§

AlterServer

MySQL’s ALTER SERVER <name> OPTIONS ( … ) federated-server change, gated by StatementDdlGates::server_definition; see AlterServer. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterServer>

The ALTER SERVER details; see AlterServer.

§meta: Meta

Source location and node identity.

§

DropServer

MySQL’s DROP SERVER [IF EXISTS] <name> federated-server drop, gated by StatementDdlGates::server_definition; see DropServer. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§drop: Box<DropServer>

The DROP SERVER details; see DropServer.

§meta: Meta

Source location and node identity.

§

AlterInstance

MySQL’s ALTER INSTANCE <action> server-instance administration statement (alter_instance_stmt), gated by StatementDdlGates::alter_instance; see AlterInstance. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterInstance>

The ALTER INSTANCE details; see AlterInstance.

§meta: Meta

Source location and node identity.

§

CreateSpatialReferenceSystem

MySQL’s CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM [IF NOT EXISTS] <srid> <attrs> spatial-reference-system definition, gated by StatementDdlGates::spatial_reference_system; see CreateSpatialReferenceSystem. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateSpatialReferenceSystem>

The CREATE SPATIAL REFERENCE SYSTEM details; see CreateSpatialReferenceSystem.

§meta: Meta

Source location and node identity.

§

DropSpatialReferenceSystem

MySQL’s DROP SPATIAL REFERENCE SYSTEM [IF EXISTS] <srid> drop, gated by StatementDdlGates::spatial_reference_system; see DropSpatialReferenceSystem. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§drop: Box<DropSpatialReferenceSystem>

The DROP SPATIAL REFERENCE SYSTEM details; see DropSpatialReferenceSystem.

§meta: Meta

Source location and node identity.

§

CreateResourceGroup

MySQL’s CREATE RESOURCE GROUP <name> TYPE [=] {SYSTEM | USER} … definition, gated by StatementDdlGates::resource_group; see CreateResourceGroup. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§create: Box<CreateResourceGroup>

The CREATE RESOURCE GROUP details; see CreateResourceGroup.

§meta: Meta

Source location and node identity.

§

AlterResourceGroup

MySQL’s ALTER RESOURCE GROUP <name> … change, gated by StatementDdlGates::resource_group; see AlterResourceGroup. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterResourceGroup>

The ALTER RESOURCE GROUP details; see AlterResourceGroup.

§meta: Meta

Source location and node identity.

§

DropResourceGroup

MySQL’s DROP RESOURCE GROUP <name> [FORCE] drop, gated by StatementDdlGates::resource_group; see DropResourceGroup. Boxed, like the other family payloads, to keep the enum within its size budget. (The SET RESOURCE GROUP family member is a SessionStatement::SetResourceGroup, dispatched off the shared SET head.)

Fields

§drop: Box<DropResourceGroup>

The DROP RESOURCE GROUP details; see DropResourceGroup.

§meta: Meta

Source location and node identity.

§

AlterSequence

DuckDB’s ALTER SEQUENCE [IF EXISTS] <name> <option>... statement (AlterSeqStmt), gated by StatementDdlGates::alter_sequence. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterSequence<X>>

The ALTER SEQUENCE details; see AlterSequence.

§meta: Meta

Source location and node identity.

§

AlterObjectSchema

DuckDB’s ALTER {TABLE | VIEW | SEQUENCE} [IF EXISTS] <name> SET SCHEMA <schema> statement (AlterObjectSchemaStmt), gated by StatementDdlGates::alter_object_set_schema. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§alter: Box<AlterObjectSchema>

The ALTER … SET SCHEMA details; see AlterObjectSchema.

§meta: Meta

Source location and node identity.

§

Pivot

DuckDB’s leading-keyword PIVOT <source> [ON …] [USING …] [GROUP BY …] statement (DuckDB’s PivotStatement). Dispatched like the utility statements — not a Query body, since DuckDB models it as its own top-level statement (json_serialize_sql rejects it as “Only SELECT statements can be serialized”). Shares the Pivot core with the TableFactor::Pivot surface (tagged PivotSpelling::Statement). Boxed, like the other family payloads, to keep the enum within its size budget. Gated by TableFactorSyntax::pivot.

Fields

§pivot: Box<Pivot<X>>

The PIVOT details; see Pivot.

§meta: Meta

Source location and node identity.

§

Unpivot

DuckDB’s leading-keyword UNPIVOT <source> ON <cols> [INTO NAME … VALUE …] statement — the Unpivot counterpart of Pivot.

Fields

§unpivot: Box<Unpivot<X>>

The UNPIVOT details; see Unpivot.

§meta: Meta

Source location and node identity.

§

ShowRef

DuckDB’s leading-keyword {DESCRIBE | SUMMARIZE} <query> | <table> introspection statement (gated by ShowSyntax::describe_summarize). DuckDB desugars it to SELECT * FROM (<SHOW_REF>), so it shares the ShowRef core with the TableFactor::ShowRef table source — the same kind + target, at statement rather than table-factor position (mirroring how Pivot shares its core with the pivot table factor). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§show: Box<ShowRef<X>>

The DESCRIBE/SHOW/SUMMARIZE reference; see ShowRef.

§meta: Meta

Source location and node identity.

§

Prepare

A DuckDB PREPARE <name> AS <statement> prepared-statement definition (gated by UtilitySyntax::prepared_statements); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§prepare: Box<PrepareStatement<X>>

The PREPARE details; see PrepareStatement.

§meta: Meta

Source location and node identity.

§

Execute

A DuckDB EXECUTE <name> [(<args>)] prepared-statement invocation, sharing the Prepare prepared_statements gate.

Fields

§execute: Box<ExecuteStatement<X>>

The EXECUTE details; see ExecuteStatement.

§meta: Meta

Source location and node identity.

§

PrepareFrom

A MySQL PREPARE <name> FROM {'text' | @var} prepared-statement definition (gated by UtilitySyntax::prepared_statements_from) — a distinct behaviour on the PREPARE keyword from DuckDB’s typed Prepare form; see PrepareFromStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§prepare_from: Box<PrepareFromStatement>

The PREPARE ... FROM details; see PrepareFromStatement.

§meta: Meta

Source location and node identity.

§

ExecuteUsing

A MySQL EXECUTE <name> [USING @var, ...] prepared-statement invocation (gated by UtilitySyntax::prepared_statements_from) — a distinct argument surface on the EXECUTE keyword from DuckDB’s parenthesized Execute form; see ExecuteUsingStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§execute_using: Box<ExecuteUsingStatement>

The EXECUTE ... USING details; see ExecuteUsingStatement.

§meta: Meta

Source location and node identity.

§

Deallocate

A {DEALLOCATE | DROP} [PREPARE] <name> prepared-statement release. DuckDB shares the Prepare prepared_statements gate; MySQL’s {DEALLOCATE | DROP} PREPARE <name> rides prepared_statements_from. Both spell the same DeallocateStatement node.

Fields

§deallocate: Box<DeallocateStatement>

The DEALLOCATE details; see DeallocateStatement.

§meta: Meta

Source location and node identity.

§

Call

A DuckDB CALL <name>(<args>) routine invocation (gated by UtilitySyntax::call); first-class for the same builtin-blind-seam reason as Pragma. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§call: Box<CallStatement<X>>

The CALL details; see CallStatement.

§meta: Meta

Source location and node identity.

§

Do

A PostgreSQL DO [LANGUAGE <lang>] '<body>' anonymous code block (gated by UtilitySyntax::do_statement). Non-generic in its payload — the block body is an opaque string, not a SQL expression — but the enum arm still carries X from the surrounding Statement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§do_block: Box<DoStatement>

The DO block details; see DoStatement.

§meta: Meta

Source location and node identity.

§

DoExpressions

A MySQL DO <expr> [, <expr> ...] evaluate-and-discard statement (gated by UtilitySyntax::do_expression_list) — a distinct behaviour on the DO keyword from PostgreSQL’s Do code block; see DoExpressionsStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§do_expressions: Box<DoExpressionsStatement<X>>

The evaluated expression list; see DoExpressionsStatement.

§meta: Meta

Source location and node identity.

§

LockTables

A MySQL LOCK {TABLES | TABLE} <tbl> [[AS] <alias>] <lock-kind> [, ...] explicit table-locking statement (gated by UtilitySyntax::lock_tables) — the per-table lock-kind reading of the leading LOCK keyword, distinct from PostgreSQL’s unimplemented statement-level mode-list reading; see LockTablesStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§lock_tables: Box<LockTablesStatement>

The LOCK TABLES details; see LockTablesStatement.

§meta: Meta

Source location and node identity.

§

UnlockTables

A MySQL UNLOCK {TABLES | TABLE} statement releasing the session’s table locks (gated by UtilitySyntax::lock_tables, the release counterpart of LockTables); see UnlockTablesStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§unlock_tables: Box<UnlockTablesStatement>

The UNLOCK TABLES details; see UnlockTablesStatement.

§meta: Meta

Source location and node identity.

§

InstanceLock

A MySQL LOCK INSTANCE FOR BACKUP / UNLOCK INSTANCE instance-wide backup-lock statement (gated by UtilitySyntax::lock_instance); one variant for the acquire/release pair — see InstanceLockStatement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§instance_lock: Box<InstanceLockStatement>

The instance-lock details; see InstanceLockStatement.

§meta: Meta

Source location and node identity.

§

Compound

A MySQL [<label>:] BEGIN … END [<label>] compound block — the stored-program body node. Body-context-only: reached through the parse_body_statement dispatcher, never at top level (a bare top-level BEGIN is transaction-start). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§compound: Box<CompoundStatement<X>>

The compound-block details; see CompoundStatement.

§meta: Meta

Source location and node identity.

§

If

A MySQL IF … THEN … [ELSEIF …] [ELSE …] END IF compound-body statement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§if_statement: Box<IfStatement<X>>

The IF details; see IfStatement.

§meta: Meta

Source location and node identity.

§

Case

A MySQL CASE … END CASE compound-body statement (simple or searched). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§case_statement: Box<CaseStatement<X>>

The CASE details; see CaseStatement.

§meta: Meta

Source location and node identity.

§

Loop

A MySQL [<label>:] LOOP … END LOOP compound-body statement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§loop_statement: Box<LoopStatement<X>>

The LOOP details; see LoopStatement.

§meta: Meta

Source location and node identity.

§

While

A MySQL [<label>:] WHILE … DO … END WHILE compound-body statement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§while_statement: Box<WhileStatement<X>>

The WHILE details; see WhileStatement.

§meta: Meta

Source location and node identity.

§

Repeat

A MySQL [<label>:] REPEAT … UNTIL … END REPEAT compound-body statement. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§repeat: Box<RepeatStatement<X>>

The REPEAT details; see RepeatStatement.

§meta: Meta

Source location and node identity.

§

Leave

A MySQL LEAVE <label> compound-body statement. Boxed for a uniform family shape (the payload alone exceeds the 24-byte enum budget once its own meta is added).

Fields

§leave: Box<LeaveStatement>

The LEAVE details; see LeaveStatement.

§meta: Meta

Source location and node identity.

§

Iterate

A MySQL ITERATE <label> compound-body statement. Boxed for a uniform family shape.

Fields

§iterate: Box<IterateStatement>

The ITERATE details; see IterateStatement.

§meta: Meta

Source location and node identity.

§

Return

A MySQL RETURN <expr> compound-body statement (stored functions only). Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§return_statement: Box<ReturnStatement<X>>

The RETURN details; see ReturnStatement.

§meta: Meta

Source location and node identity.

§

OpenCursor

A MySQL OPEN <cursor> compound-body statement. Boxed for a uniform family shape.

Fields

§open: Box<OpenCursorStatement>

The OPEN details; see OpenCursorStatement.

§meta: Meta

Source location and node identity.

§

FetchCursor

A MySQL FETCH [[NEXT] FROM] <cursor> INTO … compound-body statement. Boxed for a uniform family shape.

Fields

§fetch: Box<FetchCursorStatement>

The FETCH details; see FetchCursorStatement.

§meta: Meta

Source location and node identity.

§

CloseCursor

A MySQL CLOSE <cursor> compound-body statement. Boxed for a uniform family shape.

Fields

§close: Box<CloseCursorStatement>

The CLOSE details; see CloseCursorStatement.

§meta: Meta

Source location and node identity.

§

Signal

A MySQL SIGNAL {SQLSTATE '…' | <condition-name>} [SET …] statement — raise a condition. A top-level statement (its own signal_diagnostics gate) that also appears in stored-program bodies. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§signal: Box<SignalStatement<X>>

The SIGNAL details; see SignalStatement.

§meta: Meta

Source location and node identity.

§

Resignal

A MySQL RESIGNAL [{SQLSTATE '…' | <condition-name>}] [SET …] statement — re-raise the current condition, optionally amended. Shares SignalStatement with Signal. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§resignal: Box<SignalStatement<X>>

The RESIGNAL details; see SignalStatement.

§meta: Meta

Source location and node identity.

§

GetDiagnostics

A MySQL GET [CURRENT | STACKED] DIAGNOSTICS … statement — read the diagnostics area. A top-level statement (its own signal_diagnostics gate) that also appears in stored-program bodies. Boxed, like the other family payloads, to keep the enum within its size budget.

Fields

§get_diagnostics: Box<GetDiagnosticsStatement<X>>

The GET DIAGNOSTICS details; see GetDiagnosticsStatement.

§meta: Meta

Source location and node identity.

§

Other

Dialect extension node supplied by the extension type.

Fields

§ext: X

The dialect extension node value.

§meta: Meta

Source location and node identity.

Implementations§

Source§

impl<X: Extension> Statement<X>

Source

pub fn as_query(&self) -> Option<&Query<X>>

Borrow this statement as a query, when it is one.

Trait Implementations§

Source§

impl<X: Clone + Extension> Clone for Statement<X>

Source§

fn clone(&self) -> Statement<X>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<X: Debug + Extension> Debug for Statement<X>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, X> Deserialize<'de> for Statement<X>
where X: Deserialize<'de> + Extension,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<X: Eq + Extension> Eq for Statement<X>

Source§

impl<X: Extension + Render> FragmentRender for Statement<X>

Source§

impl<X: Hash + Extension> Hash for Statement<X>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<X: PartialEq + Extension> PartialEq for Statement<X>

Source§

fn eq(&self, other: &Statement<X>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<X: Extension + Render> Render for Statement<X>

Source§

fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result

Return the render for this value.
Source§

fn operand_binding_power(&self) -> Option<BindingPower>

The binding power this node contributes when it appears as an operand, or None (the default) for a self-delimiting node — an atom, call, or constructor — that never needs parentheses. Read more
Source§

impl<X> Serialize for Statement<X>
where X: Serialize + Extension,

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<X: Extension> Spanned for Statement<X>

Source§

fn span(&self) -> Span

Return the span for this value.
Source§

impl<X: PartialEq + Extension> StructuralPartialEq for Statement<X>

Auto Trait Implementations§

§

impl<X> Freeze for Statement<X>
where X: Freeze,

§

impl<X> RefUnwindSafe for Statement<X>
where X: RefUnwindSafe,

§

impl<X> Send for Statement<X>
where X: Send,

§

impl<X> Sync for Statement<X>
where X: Sync,

§

impl<X> Unpin for Statement<X>
where X: Unpin,

§

impl<X> UnsafeUnpin for Statement<X>
where X: UnsafeUnpin,

§

impl<X> UnwindSafe for Statement<X>
where X: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynAstExt for T
where T: Extension + Render + 'static,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Erase to &dyn Any for downcasting a node back to its concrete type.
Source§

fn dyn_clone(&self) -> Box<dyn DynAstExt>

Clone into a fresh box — the object-safe stand-in for Clone (whose Self-returning signature cannot go through a vtable).
Source§

fn dyn_eq(&self, other: &dyn DynAstExt) -> bool

Structural equality against another erased node — the object-safe stand-in for PartialEq (whose &Self argument cannot go through a vtable). Equal iff other holds the same concrete type and that type deems the values equal; differently-typed nodes are never equal.
Source§

fn dyn_hash(&self, state: &mut dyn Hasher)

Feed this node’s hash into an erased hasher — the object-safe stand-in for Hash::hash (whose generic H: Hasher cannot go through a vtable).
Source§

impl<T> Extension for T
where T: Clone + Debug + Eq + Hash + Spanned,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> RenderExt for T
where T: Render,

Source§

fn displayed<'a>(&'a self, ctx: &'a RenderCtx<'a>) -> Displayed<'a, T>

Pair this node with an explicit canonical RenderCtx so format!, to_string, and {} render it. This is the canonical path: the ctx’s resolver and source must match the node’s parse.
Source§

fn debug_sql<'a>(&'a self, resolver: &'a dyn Resolver) -> DebugSql<'a, Self>
where Self: Sized,

Render this node for debugging against an explicitly-supplied resolver (the debug-SQL mitigation), returning a Display adapter. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.