#[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
Query
A SELECT / query statement.
Fields
CreateTable
A CREATE TABLE statement.
Fields
create: Box<CreateTable<X>>The CREATE TABLE details; see CreateTable.
AlterTable
An ALTER TABLE statement.
Fields
alter: Box<AlterTable<X>>The ALTER TABLE details; see AlterTable.
Drop
A DROP statement.
Fields
drop: Box<DropStatement>The DROP details; see DropStatement.
CreateSchema
A CREATE SCHEMA statement.
Fields
schema: Box<CreateSchema<X>>The CREATE SCHEMA details; see CreateSchema.
CreateView
A CREATE VIEW statement.
Fields
view: Box<CreateView<X>>The CREATE VIEW details; see CreateView.
RefreshMaterializedView
Refresh a materialized view, including PostgreSQL’s optional execution modifiers.
Fields
refresh: Box<RefreshMaterializedView>Refresh details.
CreateColocationGroup
Create a colocation group.
Fields
create: Box<CreateColocationGroup>Statement details.
DropColocationGroup
Drop a colocation group.
Fields
drop: Box<DropColocationGroup>Statement details.
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
CreateIndex
A CREATE INDEX statement.
Fields
index: Box<CreateIndex<X>>The CREATE INDEX details; see CreateIndex.
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.
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.
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.
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.
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.
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
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.
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.
CreateDatabase
A CREATE DATABASE statement.
Fields
create: Box<CreateDatabase>The CREATE DATABASE details; see CreateDatabase.
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: RoutineObjectKindWhich routine kind is dropped (FUNCTION/PROCEDURE/ROUTINE); see RoutineObjectKind.
routines: ThinVec<RoutineSignature<X>>routines in source order.
behavior: Option<DropBehavior>Optional behavior for this syntax.
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.
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: boolWhether 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.
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.
Insert
An INSERT statement.
Fields
Update
An UPDATE statement.
Fields
Delete
A DELETE statement.
Fields
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
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.
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.
Session
A session statement (SET/RESET/SET ROLE/…).
Fields
session: Box<SessionStatement<X>>The session SET/RESET details; see SessionStatement.
AccessControl
A GRANT/REVOKE access-control statement.
Fields
access: Box<AccessControlStatement<X>>The GRANT/REVOKE details; see AccessControlStatement.
Copy
A COPY statement.
Fields
copy: Box<CopyStatement<X>>The COPY details; see CopyStatement.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Detach
A DETACH [DATABASE] [IF EXISTS] <schema> statement — the
Attach inverse, sharing its gate.
Fields
detach: Box<DetachStatement>The DETACH details; see DetachStatement.
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.
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.
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.
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.
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.
Reindex
A SQLite REINDEX [<name>] index-rebuild statement (gated by
MaintenanceSyntax::reindex).
Fields
reindex: Box<ReindexStatement>The REINDEX details; see ReindexStatement.
Analyze
A SQLite ANALYZE [<name>] statistics statement (gated by
MaintenanceSyntax::analyze).
Fields
analyze: Box<AnalyzeStatement>The ANALYZE details; see AnalyzeStatement.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
Unpivot
DuckDB’s leading-keyword UNPIVOT <source> ON <cols> [INTO NAME … VALUE …]
statement — the Unpivot counterpart of Pivot.
Fields
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Iterate
A MySQL ITERATE <label> compound-body statement. Boxed for a uniform family
shape.
Fields
iterate: Box<IterateStatement>The ITERATE details; see IterateStatement.
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.
OpenCursor
A MySQL OPEN <cursor> compound-body statement. Boxed for a uniform family shape.
Fields
open: Box<OpenCursorStatement>The OPEN details; see OpenCursorStatement.
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.
CloseCursor
A MySQL CLOSE <cursor> compound-body statement. Boxed for a uniform family shape.
Fields
close: Box<CloseCursorStatement>The CLOSE details; see CloseCursorStatement.
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.
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.
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.
Other
Dialect extension node supplied by the extension type.
Implementations§
Trait Implementations§
Source§impl<'de, X> Deserialize<'de> for Statement<X>where
X: Deserialize<'de> + Extension,
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>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl<X: Eq + Extension> Eq for Statement<X>
impl<X: Extension + Render> FragmentRender for Statement<X>
Source§impl<X: Extension + Render> Render for Statement<X>
impl<X: Extension + Render> Render for Statement<X>
Source§fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
fn render(&self, ctx: &RenderCtx<'_>, f: &mut Formatter<'_>) -> Result
Source§fn operand_binding_power(&self) -> Option<BindingPower>
fn operand_binding_power(&self) -> Option<BindingPower>
None (the default) for a self-delimiting node — an atom, call, or
constructor — that never needs parentheses. Read moreimpl<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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> DynAstExt for T
impl<T> DynAstExt for T
Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&dyn Any for downcasting a node back to its concrete type.Source§fn dyn_clone(&self) -> Box<dyn DynAstExt>
fn dyn_clone(&self) -> Box<dyn DynAstExt>
Clone (whose
Self-returning signature cannot go through a vtable).Source§fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
fn dyn_eq(&self, other: &dyn DynAstExt) -> bool
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.