Skip to main content

squonk_ast/ast/
stmt.rs

1// SPDX-License-Identifier: MIT
2// Copyright (c) 2026 Moderately AI Inc.
3
4//! The top-level `Statement` enum unifying every statement AST node.
5
6use super::{
7    AccessControlStatement, AlterDatabase, AlterDatabaseOptions, AlterEvent, AlterExtension,
8    AlterInstance, AlterLogfileGroup, AlterObjectDepends, AlterObjectSchema, AlterResourceGroup,
9    AlterRoutine, AlterSequence, AlterServer, AlterSystem, AlterTable, AlterTablespace, AlterUser,
10    AlterView, AnalyzeStatement, AttachStatement, BinlogStatement, CacheIndexStatement,
11    CallStatement, CaseStatement, CheckpointStatement, CloneStatement, CloseCursorStatement,
12    CommentOnStatement, CompoundStatement, CopyIntoStatement, CopyStatement, CreateColocationGroup,
13    CreateDatabase, CreateEvent, CreateExtension, CreateFunction, CreateIndex, CreateLogfileGroup,
14    CreateMacro, CreateProcedure, CreateResourceGroup, CreateSchema, CreateSecret, CreateSequence,
15    CreateServer, CreateSpatialReferenceSystem, CreateStoredTrigger, CreateTable, CreateTablespace,
16    CreateTrigger, CreateType, CreateUser, CreateView, CreateVirtualTable, DeallocateStatement,
17    Delete, DescribeStatement, DetachStatement, DoExpressionsStatement, DoStatement, DropBehavior,
18    DropColocationGroup, DropDatabase, DropEvent, DropIndexOnTable, DropLogfileGroup,
19    DropResourceGroup, DropSecretStmt, DropServer, DropSpatialReferenceSystem, DropStatement,
20    DropTablespace, DropTransform, ExecuteStatement, ExecuteUsingStatement, ExplainStatement,
21    ExportStatement, Extension, FetchCursorStatement, FlushStatement, GetDiagnosticsStatement,
22    HandlerStatement, HelpStatement, IfStatement, ImportStatement, ImportTableStatement, Insert,
23    InstallStatement, InstanceLockStatement, IterateStatement, KillStatement, LeaveStatement,
24    LoadDataStatement, LoadIndexStatement, LoadStatement, LockTablesStatement, LoopStatement,
25    Merge, NoExt, ObjectName, OpenCursorStatement, Pivot, PragmaStatement, PrepareFromStatement,
26    PrepareStatement, PurgeStatement, Query, RefreshMaterializedView, ReindexStatement,
27    RenameStatement, RepeatStatement, ReplicationStatement, ReturnStatement, RoutineObjectKind,
28    RoutineSignature, SessionStatement, ShowRef, ShowStatement, SignalStatement,
29    TableMaintenanceStatement, ThinVec, TransactionStatement, UninstallStatement,
30    UnlockTablesStatement, Unpivot, Update, UpdateExtensionsStatement, UseStatement, UserRoleList,
31    VacuumStatement, WhileStatement, XaStatement,
32};
33use crate::vocab::Meta;
34
35#[non_exhaustive]
36#[derive(Clone, Debug, PartialEq, Eq, Hash)]
37#[cfg_attr(feature = "serde-serialize", derive(serde::Serialize))]
38#[cfg_attr(feature = "serde-deserialize", derive(serde::Deserialize))]
39/// The SQL statement forms represented by the AST.
40pub enum Statement<X: Extension = NoExt> {
41    /// A `SELECT` / query statement.
42    Query {
43        /// Query governed by this node.
44        query: Box<Query<X>>,
45        /// Source location and node identity.
46        meta: Meta,
47    },
48    /// A `CREATE TABLE` statement.
49    CreateTable {
50        /// The `CREATE TABLE` details; see [`CreateTable`].
51        create: Box<CreateTable<X>>,
52        /// Source location and node identity.
53        meta: Meta,
54    },
55    /// An `ALTER TABLE` statement.
56    AlterTable {
57        /// The `ALTER TABLE` details; see [`AlterTable`].
58        alter: Box<AlterTable<X>>,
59        /// Source location and node identity.
60        meta: Meta,
61    },
62    /// A `DROP` statement.
63    Drop {
64        /// The `DROP` details; see [`DropStatement`].
65        drop: Box<DropStatement>,
66        /// Source location and node identity.
67        meta: Meta,
68    },
69    /// A `CREATE SCHEMA` statement.
70    CreateSchema {
71        /// The `CREATE SCHEMA` details; see [`CreateSchema`].
72        schema: Box<CreateSchema<X>>,
73        /// Source location and node identity.
74        meta: Meta,
75    },
76    /// A `CREATE VIEW` statement.
77    CreateView {
78        /// The `CREATE VIEW` details; see [`CreateView`].
79        view: Box<CreateView<X>>,
80        /// Source location and node identity.
81        meta: Meta,
82    },
83    /// Refresh a materialized view, including PostgreSQL's optional execution modifiers.
84    RefreshMaterializedView {
85        /// Refresh details.
86        refresh: Box<RefreshMaterializedView>,
87        /// Source location and node identity.
88        meta: Meta,
89    },
90    /// Create a colocation group.
91    CreateColocationGroup {
92        /// Statement details.
93        create: Box<CreateColocationGroup>,
94        /// Source location and node identity.
95        meta: Meta,
96    },
97    /// Drop a colocation group.
98    DropColocationGroup {
99        /// Statement details.
100        drop: Box<DropColocationGroup>,
101        /// Source location and node identity.
102        meta: Meta,
103    },
104    /// A MySQL `ALTER [ALGORITHM = …] [DEFINER = …] [SQL SECURITY …] VIEW …` statement — the
105    /// view redefinition, kept apart from [`AlterTable`](Self::AlterTable) and the DuckDB
106    /// `ALTER … SET SCHEMA` relocation. Boxed to keep the enum within its size budget.
107    AlterView {
108        /// The `ALTER VIEW` details; see [`AlterView`].
109        alter: Box<AlterView<X>>,
110        /// Source location and node identity.
111        meta: Meta,
112    },
113    /// A `CREATE INDEX` statement.
114    CreateIndex {
115        /// The `CREATE INDEX` details; see [`CreateIndex`].
116        index: Box<CreateIndex<X>>,
117        /// Source location and node identity.
118        meta: Meta,
119    },
120    /// A `CREATE [OR REPLACE] FUNCTION` statement. Boxed, like the other family
121    /// payloads, to keep the enum within its size budget.
122    CreateFunction {
123        /// The `CREATE FUNCTION` details; see [`CreateFunction`].
124        create: Box<CreateFunction<X>>,
125        /// Source location and node identity.
126        meta: Meta,
127    },
128    /// A MySQL `CREATE [DEFINER = …] PROCEDURE …` statement — the stored-procedure
129    /// definition, kept apart from [`CreateFunction`](Self::CreateFunction) (no `RETURNS`,
130    /// a `CALL`-invoked body that rejects `RETURN`). Boxed to keep the enum within its size
131    /// budget.
132    CreateProcedure {
133        /// The `CREATE PROCEDURE` details; see [`CreateProcedure`].
134        create: Box<CreateProcedure<X>>,
135        /// Source location and node identity.
136        meta: Meta,
137    },
138    /// A MySQL `ALTER {PROCEDURE | FUNCTION} <name> [<characteristic> …]` statement — the
139    /// routine-characteristics alteration (no body). Boxed to keep the enum within its size
140    /// budget.
141    AlterRoutine {
142        /// The `ALTER PROCEDURE`/`ALTER FUNCTION` details; see [`AlterRoutine`].
143        alter: Box<AlterRoutine<X>>,
144        /// Source location and node identity.
145        meta: Meta,
146    },
147    /// A MySQL `CREATE [DEFINER = …] EVENT …` statement — the scheduled-event definition.
148    /// Boxed to keep the enum within its size budget.
149    CreateEvent {
150        /// The `CREATE EVENT` details; see [`CreateEvent`].
151        create: Box<CreateEvent<X>>,
152        /// Source location and node identity.
153        meta: Meta,
154    },
155    /// A MySQL `ALTER [DEFINER = …] EVENT …` statement — the scheduled-event alteration.
156    /// Boxed to keep the enum within its size budget.
157    AlterEvent {
158        /// The `ALTER EVENT` details; see [`AlterEvent`].
159        alter: Box<AlterEvent<X>>,
160        /// Source location and node identity.
161        meta: Meta,
162    },
163    /// A MySQL `DROP EVENT [IF EXISTS] <name>` statement — kept apart from
164    /// [`Drop`](Self::Drop) because an event drop names exactly one event and takes no
165    /// `CASCADE`/`RESTRICT`. Boxed to keep the enum within its size budget.
166    DropEvent {
167        /// The `DROP EVENT` details; see [`DropEvent`].
168        drop: Box<DropEvent>,
169        /// Source location and node identity.
170        meta: Meta,
171    },
172    /// A MySQL `DROP {DATABASE | SCHEMA} [IF EXISTS] <name>` statement — kept apart from
173    /// [`Drop`](Self::Drop) because it names exactly one unqualified database and takes no
174    /// `CASCADE`/`RESTRICT`, and because `DATABASE`/`SCHEMA` are synonyms here (unlike the
175    /// shared name-list `DROP SCHEMA`). Boxed to keep the enum within its size budget.
176    DropDatabase {
177        /// The `DROP DATABASE`/`DROP SCHEMA` details; see [`DropDatabase`].
178        drop: Box<DropDatabase>,
179        /// Source location and node identity.
180        meta: Meta,
181    },
182    /// A MySQL `DROP INDEX <name> ON <table> [ALGORITHM …] [LOCK …]` statement — kept apart
183    /// from [`Drop`](Self::Drop) because it names the owning table with a mandatory `ON` and
184    /// carries the online-DDL `ALGORITHM`/`LOCK` hints. Boxed to keep the enum within its
185    /// size budget.
186    DropIndex {
187        /// The `DROP INDEX … ON …` details; see [`DropIndexOnTable`].
188        drop: Box<DropIndexOnTable>,
189        /// Source location and node identity.
190        meta: Meta,
191    },
192    /// A `CREATE DATABASE` statement.
193    CreateDatabase {
194        /// The `CREATE DATABASE` details; see [`CreateDatabase`].
195        create: Box<CreateDatabase>,
196        /// Source location and node identity.
197        meta: Meta,
198    },
199    /// A `DROP {FUNCTION | PROCEDURE | ROUTINE} <signature> [, ...]` statement — the
200    /// routine drop, kept apart from [`Drop`](Self::Drop) because a routine is named
201    /// by an argument-type signature ([`RoutineSignature`]), not a plain name.
202    DropRoutine {
203        /// Which routine kind is dropped (`FUNCTION`/`PROCEDURE`/`ROUTINE`); see [`RoutineObjectKind`].
204        kind: RoutineObjectKind,
205        /// Whether the if exists form was present in the source.
206        if_exists: bool,
207        /// routines in source order.
208        routines: ThinVec<RoutineSignature<X>>,
209        /// Optional behavior for this syntax.
210        behavior: Option<super::DropBehavior>,
211        /// Source location and node identity.
212        meta: Meta,
213    },
214    /// A PostgreSQL `DROP TRANSFORM [IF EXISTS] FOR <type> LANGUAGE <lang> [CASCADE |
215    /// RESTRICT]` statement (`DropTransformStmt`), kept apart from [`Drop`](Self::Drop)
216    /// because a transform is named by a `(type, language)` pair (an
217    /// [`ObjectReference::Transform`](super::ObjectReference)), not a plain name list.
218    /// Gated by [`StatementDdlGates::transform_ddl`](crate::dialect::StatementDdlGates::transform_ddl).
219    /// Boxed, like the other family payloads, to keep the enum within its size budget.
220    DropTransform {
221        /// The `DROP TRANSFORM` details; see [`DropTransform`].
222        drop: Box<DropTransform<X>>,
223        /// Source location and node identity.
224        meta: Meta,
225    },
226    /// A `TRUNCATE [TABLE] <name> [, ...] [RESTART IDENTITY | CONTINUE IDENTITY]
227    /// [CASCADE | RESTRICT]` statement. Standard SQL:2008 (F200) and accepted by every
228    /// shipped dialect, so it carries no [`FeatureSet`](crate::dialect::FeatureSet) gate.
229    /// The optional `TABLE` keyword is exact-synonym sugar; a
230    /// [`table_keyword`](Self::Truncate::table_keyword) tag records whether it was
231    /// written so a source-fidelity render replays it (the canonical render emits
232    /// `TRUNCATE TABLE`). Inline-field, like [`DropRoutine`](Self::DropRoutine): a table
233    /// list plus its flags carries no expressions or extension nodes.
234    Truncate {
235        /// Tables in source order.
236        tables: ThinVec<ObjectName>,
237        /// Whether the optional `TABLE` keyword was written (`TRUNCATE TABLE t` vs the
238        /// bare `TRUNCATE t`). Fidelity only; the canonical render emits `TABLE`.
239        table_keyword: bool,
240        /// `Some(true)` = `RESTART IDENTITY`, `Some(false)` = `CONTINUE IDENTITY`, `None`
241        /// = neither clause written. PostgreSQL collapses the absent and `CONTINUE` forms
242        /// (both leave sequences untouched); the tag keeps them distinct so they
243        /// round-trip.
244        restart_identity: Option<bool>,
245        /// Optional behavior for this syntax.
246        behavior: Option<DropBehavior>,
247        /// Source location and node identity.
248        meta: Meta,
249    },
250    /// A `COMMENT ON <object> IS '<text>' | NULL` object-metadata statement
251    /// (PostgreSQL-specific; gated by
252    /// [`UtilitySyntax::comment_on`](crate::dialect::UtilitySyntax)). Boxed, like the
253    /// other family payloads, to keep the enum within its size budget; the fields live on
254    /// [`CommentOnStatement`].
255    CommentOn {
256        /// The `COMMENT ON` details; see [`CommentOnStatement`].
257        comment: Box<CommentOnStatement<X>>,
258        /// Source location and node identity.
259        meta: Meta,
260    },
261    /// An `INSERT` statement.
262    Insert {
263        /// The `INSERT` details; see [`Insert`].
264        insert: Box<Insert<X>>,
265        /// Source location and node identity.
266        meta: Meta,
267    },
268    /// An `UPDATE` statement.
269    Update {
270        /// The `UPDATE` details; see [`Update`].
271        update: Box<Update<X>>,
272        /// Source location and node identity.
273        meta: Meta,
274    },
275    /// A `DELETE` statement.
276    Delete {
277        /// The `DELETE` details; see [`Delete`].
278        delete: Box<Delete<X>>,
279        /// Source location and node identity.
280        meta: Meta,
281    },
282    /// A `MERGE INTO ... USING ... WHEN [NOT] MATCHED ...` statement (SQL:2003).
283    /// Boxed, like the other DML payloads, to keep the enum within its size budget.
284    Merge {
285        /// The `MERGE` details; see [`Merge`].
286        merge: Box<Merge<X>>,
287        /// Source location and node identity.
288        meta: Meta,
289    },
290    /// A transaction-control statement (`BEGIN`/`COMMIT`/`ROLLBACK`/…). Boxed, like
291    /// the other family payloads, to keep the enum within its size budget.
292    Transaction {
293        /// The transaction-control details (`BEGIN`/`COMMIT`/…); see [`TransactionStatement`].
294        transaction: Box<TransactionStatement>,
295        /// Source location and node identity.
296        meta: Meta,
297    },
298    /// A MySQL `XA` distributed-transaction statement (gated by
299    /// [`UtilitySyntax::xa_transactions`](crate::dialect::UtilitySyntax)) — the X/Open XA
300    /// two-phase-commit verbs, a family distinct from the ANSI
301    /// [`Transaction`](Self::Transaction) control statements. Boxed, like the other family
302    /// payloads, to keep the enum within its size budget; see [`XaStatement`].
303    Xa {
304        /// The `XA` statement details; see [`XaStatement`].
305        xa: Box<XaStatement>,
306        /// Source location and node identity.
307        meta: Meta,
308    },
309    /// A session statement (`SET`/`RESET`/`SET ROLE`/…).
310    Session {
311        /// The session `SET`/`RESET` details; see [`SessionStatement`].
312        session: Box<SessionStatement<X>>,
313        /// Source location and node identity.
314        meta: Meta,
315    },
316    /// A `GRANT`/`REVOKE` access-control statement.
317    AccessControl {
318        /// The `GRANT`/`REVOKE` details; see [`AccessControlStatement`].
319        access: Box<AccessControlStatement<X>>,
320        /// Source location and node identity.
321        meta: Meta,
322    },
323    /// A `COPY` statement.
324    Copy {
325        /// The `COPY` details; see [`CopyStatement`].
326        copy: Box<CopyStatement<X>>,
327        /// Source location and node identity.
328        meta: Meta,
329    },
330    /// A Snowflake `COPY INTO <target> FROM <source> ...` bulk load/unload statement
331    /// (gated by [`UtilitySyntax::copy_into`](crate::dialect::UtilitySyntax)). A sibling
332    /// of [`Copy`](Self::Copy) rather than a variant of it — the two share only the
333    /// `COPY` keyword; see [`CopyIntoStatement`].
334    CopyInto {
335        /// The `COPY INTO` details; see [`CopyIntoStatement`].
336        copy: Box<CopyIntoStatement<X>>,
337        /// Source location and node identity.
338        meta: Meta,
339    },
340    /// A DuckDB `EXPORT DATABASE ['<db>' TO] '<path>' [<opts>]` catalogue-dump statement
341    /// (gated — with its [`Import`](Self::Import) inverse — by
342    /// [`UtilitySyntax::export_import_database`](crate::dialect::UtilitySyntax)). First-class
343    /// for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the
344    /// other family payloads, to keep the enum within its size budget; see [`ExportStatement`].
345    Export {
346        /// The `EXPORT DATABASE` details; see [`ExportStatement`].
347        export: Box<ExportStatement>,
348        /// Source location and node identity.
349        meta: Meta,
350    },
351    /// A DuckDB `IMPORT DATABASE '<path>'` catalogue-replay statement — the
352    /// [`Export`](Self::Export) inverse, sharing its gate; see [`ImportStatement`].
353    Import {
354        /// The `IMPORT DATABASE` details; see [`ImportStatement`].
355        import: Box<ImportStatement>,
356        /// Source location and node identity.
357        meta: Meta,
358    },
359    /// An `EXPLAIN` / `EXPLAIN ANALYZE` query-plan statement (also spelled `DESCRIBE` /
360    /// `DESC` under MySQL — the [`spelling`](ExplainStatement::spelling) tag records which).
361    Explain {
362        /// The `EXPLAIN` details; see [`ExplainStatement`].
363        explain: Box<ExplainStatement<X>>,
364        /// Source location and node identity.
365        meta: Meta,
366    },
367    /// A MySQL `{DESCRIBE | DESC | EXPLAIN} <table> [<column> | '<pattern>']`
368    /// table-metadata statement (gated by
369    /// [`ShowSyntax::describe`](crate::dialect::UtilitySyntax)); the MySQL overload of
370    /// the EXPLAIN keyword that describes a table rather than planning a query. First-class
371    /// for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the
372    /// other family payloads, to keep the enum within its size budget.
373    Describe {
374        /// The `DESCRIBE` details; see [`DescribeStatement`].
375        describe: Box<DescribeStatement>,
376        /// Source location and node identity.
377        meta: Meta,
378    },
379    /// A typed `SHOW TABLES` catalogue-listing statement (MySQL/DuckDB; gated by
380    /// [`ShowSyntax::show_tables`](crate::dialect::UtilitySyntax)) — distinct from the
381    /// generic session `SHOW <var>` ([`Session`](Self::Session)). Opener of the typed-`SHOW`
382    /// family; first-class for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma).
383    /// Boxed, like the other family payloads, to keep the enum within its size budget; the
384    /// fields live on [`ShowStatement`].
385    Show {
386        /// The `SHOW` details; see [`ShowStatement`].
387        show: Box<ShowStatement<X>>,
388        /// Source location and node identity.
389        meta: Meta,
390    },
391    /// A MySQL `KILL [CONNECTION | QUERY] <id>` thread/query-termination statement (gated
392    /// by [`UtilitySyntax::kill`](crate::dialect::UtilitySyntax)); first-class for the same
393    /// builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the other family
394    /// payloads, to keep the enum within its size budget.
395    Kill {
396        /// The `KILL` details; see [`KillStatement`].
397        kill: Box<KillStatement<X>>,
398        /// Source location and node identity.
399        meta: Meta,
400    },
401    /// A MySQL `HANDLER` low-level cursor statement — `OPEN`/`READ`/`CLOSE` direct
402    /// storage-engine access (gated by
403    /// [`UtilitySyntax::handler_statements`](crate::dialect::UtilitySyntax)); see
404    /// [`HandlerStatement`]. Boxed, like the other family payloads, to keep the enum within
405    /// its size budget.
406    Handler {
407        /// The `HANDLER` details; see [`HandlerStatement`].
408        handler: Box<HandlerStatement<X>>,
409        /// Source location and node identity.
410        meta: Meta,
411    },
412    /// A MySQL `INSTALL PLUGIN`/`INSTALL COMPONENT` server-administration statement (gated by
413    /// [`UtilitySyntax::plugin_component_statements`](crate::dialect::UtilitySyntax)); see
414    /// [`InstallStatement`]. Boxed, like the other family payloads, to keep the enum within
415    /// its size budget.
416    Install {
417        /// The `INSTALL` details; see [`InstallStatement`].
418        install: Box<InstallStatement<X>>,
419        /// Source location and node identity.
420        meta: Meta,
421    },
422    /// A MySQL `UNINSTALL PLUGIN`/`UNINSTALL COMPONENT` server-administration statement, the
423    /// inverse of [`Install`](Self::Install) (gated by the same
424    /// [`UtilitySyntax::plugin_component_statements`](crate::dialect::UtilitySyntax)); see
425    /// [`UninstallStatement`]. Boxed, like the other family payloads, to keep the enum within
426    /// its size budget.
427    Uninstall {
428        /// The `UNINSTALL` details; see [`UninstallStatement`].
429        uninstall: Box<UninstallStatement>,
430        /// Source location and node identity.
431        meta: Meta,
432    },
433    /// A MySQL `SHUTDOWN` server-shutdown statement (gated by
434    /// [`UtilitySyntax::shutdown`](crate::dialect::UtilitySyntax)) — a nullary leading keyword
435    /// with no operand (`SHUTDOWN 1` is `ER_PARSE_ERROR` on mysql:8), so it carries no payload
436    /// node.
437    Shutdown {
438        /// Source location and node identity.
439        meta: Meta,
440    },
441    /// A MySQL `RESTART` server-restart statement (gated by
442    /// [`UtilitySyntax::restart`](crate::dialect::UtilitySyntax)) — a nullary leading keyword
443    /// with no operand (`RESTART 1` is `ER_PARSE_ERROR` on mysql:8), so it carries no payload
444    /// node.
445    Restart {
446        /// Source location and node identity.
447        meta: Meta,
448    },
449    /// A MySQL `CLONE` local/remote data-directory provisioning statement (gated by
450    /// [`UtilitySyntax::clone`](crate::dialect::UtilitySyntax)); see [`CloneStatement`]. Boxed,
451    /// like the other family payloads, to keep the enum within its size budget.
452    Clone {
453        /// The `CLONE` details; see [`CloneStatement`].
454        clone: Box<CloneStatement>,
455        /// Source location and node identity.
456        meta: Meta,
457    },
458    /// A MySQL `IMPORT TABLE FROM '<file>' [, …]` tablespace-import statement (gated by
459    /// [`UtilitySyntax::import_table`](crate::dialect::UtilitySyntax)); see
460    /// [`ImportTableStatement`]. Distinct from the DuckDB `IMPORT DATABASE`
461    /// ([`Import`](Self::Import)). Boxed, like the other family payloads, to keep the enum
462    /// within its size budget.
463    ImportTable {
464        /// The `IMPORT TABLE` details; see [`ImportTableStatement`].
465        import_table: Box<ImportTableStatement>,
466        /// Source location and node identity.
467        meta: Meta,
468    },
469    /// A MySQL `HELP '<topic>'` help-lookup statement (gated by
470    /// [`UtilitySyntax::help_statement`](crate::dialect::UtilitySyntax)); see [`HelpStatement`].
471    /// Boxed, like the other family payloads, to keep the enum within its size budget.
472    Help {
473        /// The `HELP` details; see [`HelpStatement`].
474        help: Box<HelpStatement>,
475        /// Source location and node identity.
476        meta: Meta,
477    },
478    /// A MySQL `BINLOG '<base64-event>'` binary-log-event replay statement (gated by
479    /// [`UtilitySyntax::binlog`](crate::dialect::UtilitySyntax)); see [`BinlogStatement`].
480    /// Boxed, like the other family payloads, to keep the enum within its size budget.
481    Binlog {
482        /// The `BINLOG` details; see [`BinlogStatement`].
483        binlog: Box<BinlogStatement>,
484        /// Source location and node identity.
485        meta: Meta,
486    },
487    /// A SQLite `PRAGMA` configuration statement (gated by
488    /// [`UtilitySyntax::pragma`](crate::dialect::UtilitySyntax)). A first-class
489    /// variant rather than an [`Other`](Self::Other) extension because the shipped
490    /// builtin dialects are `NoExt` — the `Other(X)` seam is reachable only by an
491    /// out-of-tree dialect with its own `Ext`, never by a builtin. Boxed, like the
492    /// other family payloads, to keep the enum within its size budget.
493    Pragma {
494        /// The `PRAGMA` details; see [`PragmaStatement`].
495        pragma: Box<PragmaStatement>,
496        /// Source location and node identity.
497        meta: Meta,
498    },
499    /// A SQLite `ATTACH [DATABASE] <expr> AS <schema>` statement (gated by
500    /// [`UtilitySyntax::attach`](crate::dialect::UtilitySyntax)); first-class for
501    /// the same builtin-blind-seam reason as [`Pragma`](Self::Pragma).
502    Attach {
503        /// The `ATTACH` details; see [`AttachStatement`].
504        attach: Box<AttachStatement<X>>,
505        /// Source location and node identity.
506        meta: Meta,
507    },
508    /// A `DETACH [DATABASE] [IF EXISTS] <schema>` statement — the
509    /// [`Attach`](Self::Attach) inverse, sharing its gate.
510    Detach {
511        /// The `DETACH` details; see [`DetachStatement`].
512        detach: Box<DetachStatement>,
513        /// Source location and node identity.
514        meta: Meta,
515    },
516    /// A `[FORCE] CHECKPOINT [<database>]` write-ahead-log flush statement
517    /// (PostgreSQL/DuckDB; gated by
518    /// [`MaintenanceSyntax::checkpoint`](crate::dialect::UtilitySyntax)). First-class for
519    /// the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the
520    /// other family payloads, to keep the enum within its size budget.
521    Checkpoint {
522        /// The `CHECKPOINT` details; see [`CheckpointStatement`].
523        checkpoint: Box<CheckpointStatement>,
524        /// Source location and node identity.
525        meta: Meta,
526    },
527    /// A `LOAD <extension>` extension/shared-library load statement (PostgreSQL/DuckDB;
528    /// gated by [`UtilitySyntax::load_extension`](crate::dialect::UtilitySyntax)).
529    /// First-class for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma).
530    /// Boxed, like the other family payloads, to keep the enum within its size budget.
531    Load {
532        /// The `LOAD` details; see [`LoadStatement`].
533        load: Box<LoadStatement>,
534        /// Source location and node identity.
535        meta: Meta,
536    },
537    /// A MySQL `LOAD {DATA | XML} … INFILE … INTO TABLE …` bulk-import statement (gated by
538    /// [`UtilitySyntax::load_data`](crate::dialect::UtilitySyntax)) — a DIFFERENT behaviour on
539    /// the leading `LOAD` keyword from PostgreSQL/DuckDB's extension [`Load`](Self::Load) form
540    /// (the two gates are never both armed in one preset, dispatched on the two-word
541    /// `LOAD DATA`/`LOAD XML` lookahead); see [`LoadDataStatement`]. Boxed, like the other
542    /// family payloads, to keep the enum within its size budget.
543    LoadData {
544        /// The `LOAD DATA`/`LOAD XML` details; see [`LoadDataStatement`].
545        load_data: Box<LoadDataStatement<X>>,
546        /// Source location and node identity.
547        meta: Meta,
548    },
549    /// A DuckDB `UPDATE EXTENSIONS [( <name>, ... )]` extension-refresh statement
550    /// (gated by [`UtilitySyntax::update_extensions`](crate::dialect::UtilitySyntax));
551    /// first-class for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma).
552    /// Boxed, like the other family payloads, to keep the enum within its size budget.
553    UpdateExtensions {
554        /// The `UPDATE EXTENSIONS` details; see [`UpdateExtensionsStatement`].
555        update_extensions: Box<UpdateExtensionsStatement>,
556        /// Source location and node identity.
557        meta: Meta,
558    },
559    /// A SQLite `VACUUM [<schema>] [INTO <expr>]` maintenance statement (gated by
560    /// [`MaintenanceSyntax::vacuum`](crate::dialect::UtilitySyntax)); first-class for the
561    /// same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the
562    /// other family payloads, to keep the enum within its size budget.
563    Vacuum {
564        /// The `VACUUM` details; see [`VacuumStatement`].
565        vacuum: Box<VacuumStatement<X>>,
566        /// Source location and node identity.
567        meta: Meta,
568    },
569    /// A SQLite `REINDEX [<name>]` index-rebuild statement (gated by
570    /// [`MaintenanceSyntax::reindex`](crate::dialect::UtilitySyntax)).
571    Reindex {
572        /// The `REINDEX` details; see [`ReindexStatement`].
573        reindex: Box<ReindexStatement>,
574        /// Source location and node identity.
575        meta: Meta,
576    },
577    /// A SQLite `ANALYZE [<name>]` statistics statement (gated by
578    /// [`MaintenanceSyntax::analyze`](crate::dialect::UtilitySyntax)).
579    Analyze {
580        /// The `ANALYZE` details; see [`AnalyzeStatement`].
581        analyze: Box<AnalyzeStatement>,
582        /// Source location and node identity.
583        meta: Meta,
584    },
585    /// A MySQL admin-table maintenance statement `{ANALYZE | CHECK | CHECKSUM | OPTIMIZE
586    /// | REPAIR} {TABLE | TABLES} <list> [options]` (gated by
587    /// [`MaintenanceSyntax::table_maintenance`](crate::dialect::MaintenanceSyntax)).
588    /// Distinct from the SQLite [`Analyze`](Self::Analyze) leading-`ANALYZE` statement:
589    /// MySQL's `ANALYZE` always takes `TABLE`, so the dispatch reserves the bare form for
590    /// the SQLite/DuckDB sibling. Boxed, like the other family payloads, to keep the enum
591    /// within its size budget.
592    TableMaintenance {
593        /// The maintenance details; see [`TableMaintenanceStatement`].
594        table_maintenance: Box<TableMaintenanceStatement>,
595        /// Source location and node identity.
596        meta: Meta,
597    },
598    /// A MySQL `CACHE INDEX <t> [<keys>][, ...] [PARTITION (...)] IN <cache>` statement —
599    /// assign a table's indexes to a named key cache (gated by
600    /// [`UtilitySyntax::key_cache_statements`](crate::dialect::UtilitySyntax)); see
601    /// [`CacheIndexStatement`]. Boxed, like the other family payloads, to keep the enum
602    /// within its size budget.
603    CacheIndex {
604        /// The `CACHE INDEX` details; see [`CacheIndexStatement`].
605        cache_index: Box<CacheIndexStatement>,
606        /// Source location and node identity.
607        meta: Meta,
608    },
609    /// A MySQL `LOAD INDEX INTO CACHE <t> [PARTITION (...)] [<keys>] [IGNORE LEAVES][, ...]`
610    /// statement — preload a table's index blocks into its key cache; the
611    /// [`CacheIndex`](Self::CacheIndex) preload sibling, sharing the
612    /// [`key_cache_statements`](crate::dialect::UtilitySyntax) gate. See
613    /// [`LoadIndexStatement`]. Distinct from the `LOAD <extension>`
614    /// [`Load`](Self::Load) statement (a different grammar and gate). Boxed, like the other
615    /// family payloads, to keep the enum within its size budget.
616    LoadIndex {
617        /// The `LOAD INDEX INTO CACHE` details; see [`LoadIndexStatement`].
618        load_index: Box<LoadIndexStatement>,
619        /// Source location and node identity.
620        meta: Meta,
621    },
622    /// A MySQL standalone `RENAME TABLE`/`RENAME USER` object-rename statement (gated by
623    /// [`UtilitySyntax::rename_statement`](crate::dialect::UtilitySyntax)); first-class
624    /// for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the
625    /// other family payloads, to keep the enum within its size budget.
626    Rename {
627        /// The `RENAME` details; see [`RenameStatement`].
628        rename: Box<RenameStatement>,
629        /// Source location and node identity.
630        meta: Meta,
631    },
632    /// A MySQL `FLUSH [NO_WRITE_TO_BINLOG | LOCAL] <target>` server-administration statement
633    /// (gated by [`UtilitySyntax::flush`](crate::dialect::UtilitySyntax)); first-class for
634    /// the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the other
635    /// family payloads, to keep the enum within its size budget.
636    Flush {
637        /// The `FLUSH` details; see [`FlushStatement`].
638        flush: Box<FlushStatement>,
639        /// Source location and node identity.
640        meta: Meta,
641    },
642    /// A MySQL `PURGE BINARY LOGS {TO '<log>' | BEFORE <datetime>}` binary-log purge
643    /// statement (gated by
644    /// [`UtilitySyntax::purge_binary_logs`](crate::dialect::UtilitySyntax)); first-class for
645    /// the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the other
646    /// family payloads, to keep the enum within its size budget.
647    Purge {
648        /// The `PURGE` details; see [`PurgeStatement`].
649        purge: Box<PurgeStatement<X>>,
650        /// Source location and node identity.
651        meta: Meta,
652    },
653    /// A MySQL replication-administration statement (gated by
654    /// [`UtilitySyntax::replication_statements`](crate::dialect::UtilitySyntax)) — `CHANGE
655    /// REPLICATION SOURCE/FILTER`, `START`/`STOP REPLICA`, and `START`/`STOP
656    /// GROUP_REPLICATION`. Boxed, like the other family payloads, to keep the enum within its
657    /// size budget; see [`ReplicationStatement`].
658    Replication {
659        /// The replication-statement details; see [`ReplicationStatement`].
660        replication: Box<ReplicationStatement>,
661        /// Source location and node identity.
662        meta: Meta,
663    },
664    /// A MySQL `CREATE USER …` account-creation statement (gated by
665    /// [`AccessControlSyntax::user_role_management`](crate::dialect::AccessControlSyntax)).
666    /// Boxed, like the other family payloads, to keep the enum within its size budget.
667    CreateUser {
668        /// The account-creation details; see [`CreateUser`].
669        create: Box<CreateUser>,
670        /// Source location and node identity.
671        meta: Meta,
672    },
673    /// A MySQL `ALTER USER …` account-modification statement (gated by
674    /// [`AccessControlSyntax::user_role_management`](crate::dialect::AccessControlSyntax)).
675    /// Boxed, like the other family payloads, to keep the enum within its size budget.
676    AlterUser {
677        /// The account-modification details; see [`AlterUser`].
678        alter: Box<AlterUser>,
679        /// Source location and node identity.
680        meta: Meta,
681    },
682    /// A MySQL `DROP USER` / `CREATE ROLE` / `DROP ROLE` account-or-role-list statement
683    /// (gated by
684    /// [`AccessControlSyntax::user_role_management`](crate::dialect::AccessControlSyntax)) —
685    /// the three verbs share one [`UserRoleList`] node with the verb carried as data. Boxed,
686    /// like the other family payloads, to keep the enum within its size budget.
687    UserRoleList {
688        /// The verb, existence guard, and name list; see [`UserRoleList`].
689        statement: Box<UserRoleList>,
690        /// Source location and node identity.
691        meta: Meta,
692    },
693    /// A DuckDB `USE <catalog> [. <schema>]` catalog/schema-switch statement (gated by
694    /// [`UtilitySyntax::use_statement`](crate::dialect::UtilitySyntax)); first-class for
695    /// the same builtin-blind-seam reason as [`Pragma`](Self::Pragma).
696    Use {
697        /// The `USE` details; see [`UseStatement`].
698        use_statement: Box<UseStatement>,
699        /// Source location and node identity.
700        meta: Meta,
701    },
702    /// A SQLite `CREATE [TEMP] TRIGGER ... BEGIN ... END` statement (gated by
703    /// [`StatementDdlGates::create_trigger`](crate::dialect::StatementDdlGates::create_trigger)).
704    /// Boxed, like the other `CREATE` payloads, to keep the enum within its size
705    /// budget.
706    CreateTrigger {
707        /// The `CREATE TRIGGER` details; see [`CreateTrigger`].
708        create: Box<CreateTrigger<X>>,
709        /// Source location and node identity.
710        meta: Meta,
711    },
712    /// A MySQL `CREATE [DEFINER = …] TRIGGER … FOR EACH ROW <sp_proc_stmt>` statement — the
713    /// stored-program (SQL/PSM) trigger, kept apart from the SQLite
714    /// [`CreateTrigger`](Self::CreateTrigger) whose body is a `BEGIN <stmt>; … END` list of
715    /// plain SQL statements. Boxed to keep the enum within its size budget.
716    CreateStoredTrigger {
717        /// The MySQL `CREATE TRIGGER` details; see [`CreateStoredTrigger`].
718        create: Box<CreateStoredTrigger<X>>,
719        /// Source location and node identity.
720        meta: Meta,
721    },
722    /// A DuckDB `CREATE [OR REPLACE] [TEMP] {MACRO | FUNCTION} <name>(<params>) AS
723    /// <expr> | AS TABLE <query>` statement (gated by
724    /// [`StatementDdlGates::create_macro`](crate::dialect::StatementDdlGates::create_macro)). A
725    /// live-body macro, kept apart from [`CreateFunction`](Self::CreateFunction) whose
726    /// body is an opaque routine string. Boxed, like the other `CREATE` payloads, to
727    /// keep the enum within its size budget.
728    CreateMacro {
729        /// The `CREATE MACRO` details; see [`CreateMacro`].
730        create: Box<CreateMacro<X>>,
731        /// Source location and node identity.
732        meta: Meta,
733    },
734    /// A DuckDB `CREATE [PERSISTENT] SECRET <name> (<option> <value>, …)`
735    /// secrets-management statement (gated by
736    /// [`StatementDdlGates::create_secret`](crate::dialect::StatementDdlGates::create_secret)). Boxed,
737    /// like the other `CREATE` payloads, to keep the enum within its size budget.
738    CreateSecret {
739        /// The `CREATE SECRET` details; see [`CreateSecret`].
740        create: Box<CreateSecret<X>>,
741        /// Source location and node identity.
742        meta: Meta,
743    },
744    /// A DuckDB `DROP [PERSISTENT | TEMPORARY] SECRET [IF EXISTS] <name> [FROM <storage>]`
745    /// secrets-management statement (gated by
746    /// [`StatementDdlGates::create_secret`](crate::dialect::StatementDdlGates::create_secret), the
747    /// same flag that admits [`Self::CreateSecret`]). Its own statement — not a
748    /// [`Self::Drop`] object kind — because `drop_secret.y` carries the persistence modifier
749    /// and `FROM <storage>` selector the shared name-list DROP grammar lacks. Boxed, like the
750    /// other DDL payloads, to keep the enum within its size budget.
751    DropSecret {
752        /// The `DROP SECRET` details; see [`DropSecretStmt`].
753        drop: Box<DropSecretStmt>,
754        /// Source location and node identity.
755        meta: Meta,
756    },
757    /// A DuckDB `CREATE [OR REPLACE] [TEMP] TYPE <name> AS ENUM(…)/STRUCT(…)/<alias>`
758    /// user-defined-type statement (gated by
759    /// [`StatementDdlGates::create_type`](crate::dialect::StatementDdlGates::create_type)). Boxed,
760    /// like the other `CREATE` payloads, to keep the enum within its size budget.
761    CreateType {
762        /// The `CREATE TYPE` details; see [`CreateType`].
763        create: Box<CreateType<X>>,
764        /// Source location and node identity.
765        meta: Meta,
766    },
767    /// A SQLite `CREATE VIRTUAL TABLE [IF NOT EXISTS] <name> USING <module> [(<args>)]`
768    /// statement (gated by
769    /// [`StatementDdlGates::create_virtual_table`](crate::dialect::StatementDdlGates::create_virtual_table)).
770    /// Boxed, like the other `CREATE` payloads, to keep the enum within its size budget.
771    /// The payload is non-generic — a virtual table's module arguments are opaque
772    /// verbatim text, carrying no expressions or extension nodes.
773    CreateVirtualTable {
774        /// The `CREATE VIRTUAL TABLE` details; see [`CreateVirtualTable`].
775        create: Box<CreateVirtualTable>,
776        /// Source location and node identity.
777        meta: Meta,
778    },
779    /// A `CREATE [TEMPORARY] SEQUENCE [IF NOT EXISTS] <name> [<option> ...]` sequence
780    /// generator (SQL:2003 T176; PostgreSQL/DuckDB), gated by
781    /// [`StatementDdlGates::create_sequence`](crate::dialect::StatementDdlGates::create_sequence). One
782    /// shared node gated per-dialect (ADR-0011), not parallel engine nodes: both engines'
783    /// parsers accept the same standard option core. Boxed, like the other `CREATE`
784    /// payloads, to keep the enum within its size budget.
785    CreateSequence {
786        /// The `CREATE SEQUENCE` details; see [`CreateSequence`].
787        create: Box<CreateSequence<X>>,
788        /// Source location and node identity.
789        meta: Meta,
790    },
791    /// A PostgreSQL `CREATE EXTENSION [IF NOT EXISTS] <name> [WITH] [SCHEMA s]
792    /// [VERSION v] [CASCADE]` statement (gated by
793    /// [`StatementDdlGates::extension_ddl`](crate::dialect::StatementDdlGates::extension_ddl)).
794    /// Boxed, like the other `CREATE` payloads, to keep the enum within its size budget.
795    CreateExtension {
796        /// The `CREATE EXTENSION` details; see [`CreateExtension`].
797        create: Box<CreateExtension>,
798        /// Source location and node identity.
799        meta: Meta,
800    },
801    /// A PostgreSQL `ALTER EXTENSION <name> {UPDATE [TO v] | ADD <member> | DROP
802    /// <member>}` statement, sharing the extension-DDL gate with
803    /// [`CreateExtension`](Self::CreateExtension). Boxed, like the other family payloads,
804    /// to keep the enum within its size budget.
805    AlterExtension {
806        /// The `ALTER EXTENSION` details; see [`AlterExtension`].
807        alter: Box<AlterExtension<X>>,
808        /// Source location and node identity.
809        meta: Meta,
810    },
811    /// A MySQL `CREATE [UNDO] TABLESPACE <name> …` NDB/InnoDB storage-DDL statement (gated by
812    /// [`StatementDdlGates::tablespace_ddl`](crate::dialect::StatementDdlGates::tablespace_ddl));
813    /// see [`CreateTablespace`]. Boxed, like the other `CREATE` payloads, to keep the enum
814    /// within its size budget.
815    CreateTablespace {
816        /// The `CREATE TABLESPACE` details; see [`CreateTablespace`].
817        create: Box<CreateTablespace>,
818        /// Source location and node identity.
819        meta: Meta,
820    },
821    /// A MySQL `ALTER [UNDO] TABLESPACE <name> <action>` statement, sharing the tablespace-DDL
822    /// gate with [`CreateTablespace`](Self::CreateTablespace); see [`AlterTablespace`]. Boxed,
823    /// like the other family payloads, to keep the enum within its size budget.
824    AlterTablespace {
825        /// The `ALTER TABLESPACE` details; see [`AlterTablespace`].
826        alter: Box<AlterTablespace>,
827        /// Source location and node identity.
828        meta: Meta,
829    },
830    /// A MySQL `DROP [UNDO] TABLESPACE <name> [<option>...]` statement, sharing the tablespace-DDL
831    /// gate with [`CreateTablespace`](Self::CreateTablespace); see [`DropTablespace`]. Boxed,
832    /// like the other family payloads, to keep the enum within its size budget.
833    DropTablespace {
834        /// The `DROP TABLESPACE` details; see [`DropTablespace`].
835        drop: Box<DropTablespace>,
836        /// Source location and node identity.
837        meta: Meta,
838    },
839    /// A MySQL `CREATE LOGFILE GROUP <name> ADD UNDOFILE '<f>' [<option>...]` NDB storage-DDL
840    /// statement (gated by
841    /// [`StatementDdlGates::logfile_group_ddl`](crate::dialect::StatementDdlGates::logfile_group_ddl));
842    /// see [`CreateLogfileGroup`]. Boxed, like the other `CREATE` payloads, to keep the enum
843    /// within its size budget.
844    CreateLogfileGroup {
845        /// The `CREATE LOGFILE GROUP` details; see [`CreateLogfileGroup`].
846        create: Box<CreateLogfileGroup>,
847        /// Source location and node identity.
848        meta: Meta,
849    },
850    /// A MySQL `ALTER LOGFILE GROUP <name> ADD UNDOFILE '<f>' [<option>...]` statement, sharing the
851    /// logfile-group-DDL gate with [`CreateLogfileGroup`](Self::CreateLogfileGroup); see
852    /// [`AlterLogfileGroup`]. Boxed, like the other family payloads, to keep the enum within its
853    /// size budget.
854    AlterLogfileGroup {
855        /// The `ALTER LOGFILE GROUP` details; see [`AlterLogfileGroup`].
856        alter: Box<AlterLogfileGroup>,
857        /// Source location and node identity.
858        meta: Meta,
859    },
860    /// A MySQL `DROP LOGFILE GROUP <name> [<option>...]` statement, sharing the logfile-group-DDL
861    /// gate with [`CreateLogfileGroup`](Self::CreateLogfileGroup); see [`DropLogfileGroup`]. Boxed,
862    /// like the other family payloads, to keep the enum within its size budget.
863    DropLogfileGroup {
864        /// The `DROP LOGFILE GROUP` details; see [`DropLogfileGroup`].
865        drop: Box<DropLogfileGroup>,
866        /// Source location and node identity.
867        meta: Meta,
868    },
869    /// A PostgreSQL `ALTER <object> [NO] DEPENDS ON EXTENSION <extension>` statement
870    /// (`AlterObjectDependsStmt`), sharing the extension-DDL gate with
871    /// [`CreateExtension`](Self::CreateExtension). Boxed, like the other family payloads,
872    /// to keep the enum within its size budget.
873    AlterObjectDepends {
874        /// The `ALTER … DEPENDS ON EXTENSION` details; see [`AlterObjectDepends`].
875        alter: Box<AlterObjectDepends<X>>,
876        /// Source location and node identity.
877        meta: Meta,
878    },
879    /// A PostgreSQL `ALTER SYSTEM { SET <name> {= | TO} <value> | RESET <name> | RESET ALL }`
880    /// server-configuration statement (`AlterSystemStmt`), gated by
881    /// [`StatementDdlGates::alter_system`](crate::dialect::StatementDdlGates::alter_system).
882    /// Boxed, like the other family payloads, to keep the enum within its size budget.
883    AlterSystem {
884        /// The `ALTER SYSTEM` details; see [`AlterSystem`].
885        alter: Box<AlterSystem>,
886        /// Source location and node identity.
887        meta: Meta,
888    },
889    /// DuckDB's `ALTER DATABASE [IF EXISTS] <name> SET ALIAS TO <alias>` statement
890    /// (`AlterDatabaseStmt`), gated by
891    /// [`StatementDdlGates::alter_database`](crate::dialect::StatementDdlGates::alter_database).
892    /// Boxed, like the other family payloads, to keep the enum within its size budget.
893    AlterDatabase {
894        /// The `ALTER DATABASE` details; see [`AlterDatabase`].
895        alter: Box<AlterDatabase>,
896        /// Source location and node identity.
897        meta: Meta,
898    },
899    /// MySQL's `ALTER {DATABASE | SCHEMA} [<name>] <option> …` schema-option change
900    /// (`alter_database_stmt`), gated by
901    /// [`StatementDdlGates::alter_database_options`](crate::dialect::StatementDdlGates::alter_database_options);
902    /// see [`AlterDatabaseOptions`]. A distinct node and gate from DuckDB's
903    /// [`AlterDatabase`](Self::AlterDatabase) `SET ALIAS` relocation. Boxed, like the other
904    /// family payloads, to keep the enum within its size budget.
905    AlterDatabaseOptions {
906        /// The `ALTER {DATABASE | SCHEMA}` option-change details; see [`AlterDatabaseOptions`].
907        alter: Box<AlterDatabaseOptions>,
908        /// Source location and node identity.
909        meta: Meta,
910    },
911    /// MySQL's `CREATE SERVER <name> FOREIGN DATA WRAPPER <wrapper> OPTIONS ( … )`
912    /// federated-server definition, gated by
913    /// [`StatementDdlGates::server_definition`](crate::dialect::StatementDdlGates::server_definition);
914    /// see [`CreateServer`]. Boxed, like the other family payloads, to keep the enum within its
915    /// size budget.
916    CreateServer {
917        /// The `CREATE SERVER` details; see [`CreateServer`].
918        create: Box<CreateServer>,
919        /// Source location and node identity.
920        meta: Meta,
921    },
922    /// MySQL's `ALTER SERVER <name> OPTIONS ( … )` federated-server change, gated by
923    /// [`StatementDdlGates::server_definition`](crate::dialect::StatementDdlGates::server_definition);
924    /// see [`AlterServer`]. Boxed, like the other family payloads, to keep the enum within its
925    /// size budget.
926    AlterServer {
927        /// The `ALTER SERVER` details; see [`AlterServer`].
928        alter: Box<AlterServer>,
929        /// Source location and node identity.
930        meta: Meta,
931    },
932    /// MySQL's `DROP SERVER [IF EXISTS] <name>` federated-server drop, gated by
933    /// [`StatementDdlGates::server_definition`](crate::dialect::StatementDdlGates::server_definition);
934    /// see [`DropServer`]. Boxed, like the other family payloads, to keep the enum within its
935    /// size budget.
936    DropServer {
937        /// The `DROP SERVER` details; see [`DropServer`].
938        drop: Box<DropServer>,
939        /// Source location and node identity.
940        meta: Meta,
941    },
942    /// MySQL's `ALTER INSTANCE <action>` server-instance administration statement
943    /// (`alter_instance_stmt`), gated by
944    /// [`StatementDdlGates::alter_instance`](crate::dialect::StatementDdlGates::alter_instance);
945    /// see [`AlterInstance`]. Boxed, like the other family payloads, to keep the enum within its
946    /// size budget.
947    AlterInstance {
948        /// The `ALTER INSTANCE` details; see [`AlterInstance`].
949        alter: Box<AlterInstance>,
950        /// Source location and node identity.
951        meta: Meta,
952    },
953    /// MySQL's `CREATE [OR REPLACE] SPATIAL REFERENCE SYSTEM [IF NOT EXISTS] <srid> <attrs>`
954    /// spatial-reference-system definition, gated by
955    /// [`StatementDdlGates::spatial_reference_system`](crate::dialect::StatementDdlGates::spatial_reference_system);
956    /// see [`CreateSpatialReferenceSystem`]. Boxed, like the other family payloads, to keep the
957    /// enum within its size budget.
958    CreateSpatialReferenceSystem {
959        /// The `CREATE SPATIAL REFERENCE SYSTEM` details; see [`CreateSpatialReferenceSystem`].
960        create: Box<CreateSpatialReferenceSystem>,
961        /// Source location and node identity.
962        meta: Meta,
963    },
964    /// MySQL's `DROP SPATIAL REFERENCE SYSTEM [IF EXISTS] <srid>` drop, gated by
965    /// [`StatementDdlGates::spatial_reference_system`](crate::dialect::StatementDdlGates::spatial_reference_system);
966    /// see [`DropSpatialReferenceSystem`]. Boxed, like the other family payloads, to keep the enum
967    /// within its size budget.
968    DropSpatialReferenceSystem {
969        /// The `DROP SPATIAL REFERENCE SYSTEM` details; see [`DropSpatialReferenceSystem`].
970        drop: Box<DropSpatialReferenceSystem>,
971        /// Source location and node identity.
972        meta: Meta,
973    },
974    /// MySQL's `CREATE RESOURCE GROUP <name> TYPE [=] {SYSTEM | USER} …` definition, gated by
975    /// [`StatementDdlGates::resource_group`](crate::dialect::StatementDdlGates::resource_group);
976    /// see [`CreateResourceGroup`]. Boxed, like the other family payloads, to keep the enum within
977    /// its size budget.
978    CreateResourceGroup {
979        /// The `CREATE RESOURCE GROUP` details; see [`CreateResourceGroup`].
980        create: Box<CreateResourceGroup>,
981        /// Source location and node identity.
982        meta: Meta,
983    },
984    /// MySQL's `ALTER RESOURCE GROUP <name> …` change, gated by
985    /// [`StatementDdlGates::resource_group`](crate::dialect::StatementDdlGates::resource_group);
986    /// see [`AlterResourceGroup`]. Boxed, like the other family payloads, to keep the enum within
987    /// its size budget.
988    AlterResourceGroup {
989        /// The `ALTER RESOURCE GROUP` details; see [`AlterResourceGroup`].
990        alter: Box<AlterResourceGroup>,
991        /// Source location and node identity.
992        meta: Meta,
993    },
994    /// MySQL's `DROP RESOURCE GROUP <name> [FORCE]` drop, gated by
995    /// [`StatementDdlGates::resource_group`](crate::dialect::StatementDdlGates::resource_group);
996    /// see [`DropResourceGroup`]. Boxed, like the other family payloads, to keep the enum within
997    /// its size budget. (The `SET RESOURCE GROUP` family member is a
998    /// [`SessionStatement::SetResourceGroup`], dispatched off the shared `SET` head.)
999    DropResourceGroup {
1000        /// The `DROP RESOURCE GROUP` details; see [`DropResourceGroup`].
1001        drop: Box<DropResourceGroup>,
1002        /// Source location and node identity.
1003        meta: Meta,
1004    },
1005    /// DuckDB's `ALTER SEQUENCE [IF EXISTS] <name> <option>...` statement (`AlterSeqStmt`),
1006    /// gated by
1007    /// [`StatementDdlGates::alter_sequence`](crate::dialect::StatementDdlGates::alter_sequence).
1008    /// Boxed, like the other family payloads, to keep the enum within its size budget.
1009    AlterSequence {
1010        /// The `ALTER SEQUENCE` details; see [`AlterSequence`].
1011        alter: Box<AlterSequence<X>>,
1012        /// Source location and node identity.
1013        meta: Meta,
1014    },
1015    /// DuckDB's `ALTER {TABLE | VIEW | SEQUENCE} [IF EXISTS] <name> SET SCHEMA <schema>`
1016    /// statement (`AlterObjectSchemaStmt`), gated by
1017    /// [`StatementDdlGates::alter_object_set_schema`](crate::dialect::StatementDdlGates::alter_object_set_schema).
1018    /// Boxed, like the other family payloads, to keep the enum within its size budget.
1019    AlterObjectSchema {
1020        /// The `ALTER … SET SCHEMA` details; see [`AlterObjectSchema`].
1021        alter: Box<AlterObjectSchema>,
1022        /// Source location and node identity.
1023        meta: Meta,
1024    },
1025    /// DuckDB's leading-keyword `PIVOT <source> [ON …] [USING …] [GROUP BY …]`
1026    /// statement (DuckDB's `PivotStatement`). Dispatched like the utility statements —
1027    /// not a [`Query`](Self::Query) body, since DuckDB models it as its own top-level
1028    /// statement (`json_serialize_sql` rejects it as "Only SELECT statements can be
1029    /// serialized"). Shares the [`Pivot`] core with the
1030    /// [`TableFactor::Pivot`](super::TableFactor) surface (tagged
1031    /// [`PivotSpelling::Statement`](super::PivotSpelling)). Boxed, like the other family
1032    /// payloads, to keep the enum within its size budget. Gated by
1033    /// [`TableFactorSyntax::pivot`](crate::dialect::TableExpressionSyntax).
1034    Pivot {
1035        /// The `PIVOT` details; see [`Pivot`].
1036        pivot: Box<Pivot<X>>,
1037        /// Source location and node identity.
1038        meta: Meta,
1039    },
1040    /// DuckDB's leading-keyword `UNPIVOT <source> ON <cols> [INTO NAME … VALUE …]`
1041    /// statement — the [`Unpivot`] counterpart of [`Pivot`](Self::Pivot).
1042    Unpivot {
1043        /// The `UNPIVOT` details; see [`Unpivot`].
1044        unpivot: Box<Unpivot<X>>,
1045        /// Source location and node identity.
1046        meta: Meta,
1047    },
1048    /// DuckDB's leading-keyword `{DESCRIBE | SUMMARIZE} <query> | <table>` introspection
1049    /// statement (gated by
1050    /// [`ShowSyntax::describe_summarize`](crate::dialect::UtilitySyntax)). DuckDB
1051    /// desugars it to `SELECT * FROM (<SHOW_REF>)`, so it shares the [`ShowRef`] core with
1052    /// the [`TableFactor::ShowRef`](super::TableFactor) table source — the same `kind` +
1053    /// `target`, at statement rather than table-factor position (mirroring how
1054    /// [`Pivot`](Self::Pivot) shares its core with the pivot table factor). Boxed, like the
1055    /// other family payloads, to keep the enum within its size budget.
1056    ShowRef {
1057        /// The `DESCRIBE`/`SHOW`/`SUMMARIZE` reference; see [`ShowRef`].
1058        show: Box<ShowRef<X>>,
1059        /// Source location and node identity.
1060        meta: Meta,
1061    },
1062    /// A DuckDB `PREPARE <name> AS <statement>` prepared-statement definition (gated by
1063    /// [`UtilitySyntax::prepared_statements`](crate::dialect::UtilitySyntax)); first-class
1064    /// for the same builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the
1065    /// other family payloads, to keep the enum within its size budget.
1066    Prepare {
1067        /// The `PREPARE` details; see [`PrepareStatement`].
1068        prepare: Box<PrepareStatement<X>>,
1069        /// Source location and node identity.
1070        meta: Meta,
1071    },
1072    /// A DuckDB `EXECUTE <name> [(<args>)]` prepared-statement invocation, sharing the
1073    /// [`Prepare`](Self::Prepare)
1074    /// [`prepared_statements`](crate::dialect::UtilitySyntax) gate.
1075    Execute {
1076        /// The `EXECUTE` details; see [`ExecuteStatement`].
1077        execute: Box<ExecuteStatement<X>>,
1078        /// Source location and node identity.
1079        meta: Meta,
1080    },
1081    /// A MySQL `PREPARE <name> FROM {'text' | @var}` prepared-statement definition (gated by
1082    /// [`UtilitySyntax::prepared_statements_from`](crate::dialect::UtilitySyntax)) — a
1083    /// distinct behaviour on the `PREPARE` keyword from DuckDB's typed [`Prepare`](Self::Prepare)
1084    /// form; see [`PrepareFromStatement`]. Boxed, like the other family payloads, to keep the
1085    /// enum within its size budget.
1086    PrepareFrom {
1087        /// The `PREPARE ... FROM` details; see [`PrepareFromStatement`].
1088        prepare_from: Box<PrepareFromStatement>,
1089        /// Source location and node identity.
1090        meta: Meta,
1091    },
1092    /// A MySQL `EXECUTE <name> [USING @var, ...]` prepared-statement invocation (gated by
1093    /// [`UtilitySyntax::prepared_statements_from`](crate::dialect::UtilitySyntax)) — a distinct
1094    /// argument surface on the `EXECUTE` keyword from DuckDB's parenthesized
1095    /// [`Execute`](Self::Execute) form; see [`ExecuteUsingStatement`]. Boxed, like the other
1096    /// family payloads, to keep the enum within its size budget.
1097    ExecuteUsing {
1098        /// The `EXECUTE ... USING` details; see [`ExecuteUsingStatement`].
1099        execute_using: Box<ExecuteUsingStatement>,
1100        /// Source location and node identity.
1101        meta: Meta,
1102    },
1103    /// A `{DEALLOCATE | DROP} [PREPARE] <name>` prepared-statement release. DuckDB shares the
1104    /// [`Prepare`](Self::Prepare) [`prepared_statements`](crate::dialect::UtilitySyntax) gate;
1105    /// MySQL's `{DEALLOCATE | DROP} PREPARE <name>` rides
1106    /// [`prepared_statements_from`](crate::dialect::UtilitySyntax). Both spell the same
1107    /// [`DeallocateStatement`] node.
1108    Deallocate {
1109        /// The `DEALLOCATE` details; see [`DeallocateStatement`].
1110        deallocate: Box<DeallocateStatement>,
1111        /// Source location and node identity.
1112        meta: Meta,
1113    },
1114    /// A DuckDB `CALL <name>(<args>)` routine invocation (gated by
1115    /// [`UtilitySyntax::call`](crate::dialect::UtilitySyntax)); first-class for the same
1116    /// builtin-blind-seam reason as [`Pragma`](Self::Pragma). Boxed, like the other family
1117    /// payloads, to keep the enum within its size budget.
1118    Call {
1119        /// The `CALL` details; see [`CallStatement`].
1120        call: Box<CallStatement<X>>,
1121        /// Source location and node identity.
1122        meta: Meta,
1123    },
1124    /// A PostgreSQL `DO [LANGUAGE <lang>] '<body>'` anonymous code block (gated by
1125    /// [`UtilitySyntax::do_statement`](crate::dialect::UtilitySyntax)). Non-generic in its
1126    /// payload — the block body is an opaque string, not a SQL expression — but the enum
1127    /// arm still carries `X` from the surrounding [`Statement`]. Boxed, like the other
1128    /// family payloads, to keep the enum within its size budget.
1129    Do {
1130        /// The `DO` block details; see [`DoStatement`].
1131        do_block: Box<DoStatement>,
1132        /// Source location and node identity.
1133        meta: Meta,
1134    },
1135    /// A MySQL `DO <expr> [, <expr> ...]` evaluate-and-discard statement (gated by
1136    /// [`UtilitySyntax::do_expression_list`](crate::dialect::UtilitySyntax)) — a distinct
1137    /// behaviour on the `DO` keyword from PostgreSQL's [`Do`](Self::Do) code block; see
1138    /// [`DoExpressionsStatement`]. Boxed, like the other family payloads, to keep the enum
1139    /// within its size budget.
1140    DoExpressions {
1141        /// The evaluated expression list; see [`DoExpressionsStatement`].
1142        do_expressions: Box<DoExpressionsStatement<X>>,
1143        /// Source location and node identity.
1144        meta: Meta,
1145    },
1146    /// A MySQL `LOCK {TABLES | TABLE} <tbl> [[AS] <alias>] <lock-kind> [, ...]` explicit
1147    /// table-locking statement (gated by
1148    /// [`UtilitySyntax::lock_tables`](crate::dialect::UtilitySyntax)) — the per-table
1149    /// lock-kind reading of the leading `LOCK` keyword, distinct from PostgreSQL's
1150    /// unimplemented statement-level mode-list reading; see [`LockTablesStatement`]. Boxed,
1151    /// like the other family payloads, to keep the enum within its size budget.
1152    LockTables {
1153        /// The `LOCK TABLES` details; see [`LockTablesStatement`].
1154        lock_tables: Box<LockTablesStatement>,
1155        /// Source location and node identity.
1156        meta: Meta,
1157    },
1158    /// A MySQL `UNLOCK {TABLES | TABLE}` statement releasing the session's table locks
1159    /// (gated by [`UtilitySyntax::lock_tables`](crate::dialect::UtilitySyntax), the release
1160    /// counterpart of [`LockTables`](Self::LockTables)); see [`UnlockTablesStatement`].
1161    /// Boxed, like the other family payloads, to keep the enum within its size budget.
1162    UnlockTables {
1163        /// The `UNLOCK TABLES` details; see [`UnlockTablesStatement`].
1164        unlock_tables: Box<UnlockTablesStatement>,
1165        /// Source location and node identity.
1166        meta: Meta,
1167    },
1168    /// A MySQL `LOCK INSTANCE FOR BACKUP` / `UNLOCK INSTANCE` instance-wide backup-lock
1169    /// statement (gated by
1170    /// [`UtilitySyntax::lock_instance`](crate::dialect::UtilitySyntax)); one variant for
1171    /// the acquire/release pair — see [`InstanceLockStatement`]. Boxed, like the other
1172    /// family payloads, to keep the enum within its size budget.
1173    InstanceLock {
1174        /// The instance-lock details; see [`InstanceLockStatement`].
1175        instance_lock: Box<InstanceLockStatement>,
1176        /// Source location and node identity.
1177        meta: Meta,
1178    },
1179    /// A MySQL `[<label>:] BEGIN … END [<label>]` compound block — the stored-program
1180    /// body node. Body-context-only: reached through the `parse_body_statement`
1181    /// dispatcher, never at top level (a bare top-level `BEGIN` is transaction-start).
1182    /// Boxed, like the other family payloads, to keep the enum within its size budget.
1183    Compound {
1184        /// The compound-block details; see [`CompoundStatement`].
1185        compound: Box<CompoundStatement<X>>,
1186        /// Source location and node identity.
1187        meta: Meta,
1188    },
1189    /// A MySQL `IF … THEN … [ELSEIF …] [ELSE …] END IF` compound-body statement. Boxed,
1190    /// like the other family payloads, to keep the enum within its size budget.
1191    If {
1192        /// The `IF` details; see [`IfStatement`].
1193        if_statement: Box<IfStatement<X>>,
1194        /// Source location and node identity.
1195        meta: Meta,
1196    },
1197    /// A MySQL `CASE … END CASE` compound-body statement (simple or searched). Boxed,
1198    /// like the other family payloads, to keep the enum within its size budget.
1199    Case {
1200        /// The `CASE` details; see [`CaseStatement`].
1201        case_statement: Box<CaseStatement<X>>,
1202        /// Source location and node identity.
1203        meta: Meta,
1204    },
1205    /// A MySQL `[<label>:] LOOP … END LOOP` compound-body statement. Boxed, like the
1206    /// other family payloads, to keep the enum within its size budget.
1207    Loop {
1208        /// The `LOOP` details; see [`LoopStatement`].
1209        loop_statement: Box<LoopStatement<X>>,
1210        /// Source location and node identity.
1211        meta: Meta,
1212    },
1213    /// A MySQL `[<label>:] WHILE … DO … END WHILE` compound-body statement. Boxed, like
1214    /// the other family payloads, to keep the enum within its size budget.
1215    While {
1216        /// The `WHILE` details; see [`WhileStatement`].
1217        while_statement: Box<WhileStatement<X>>,
1218        /// Source location and node identity.
1219        meta: Meta,
1220    },
1221    /// A MySQL `[<label>:] REPEAT … UNTIL … END REPEAT` compound-body statement. Boxed,
1222    /// like the other family payloads, to keep the enum within its size budget.
1223    Repeat {
1224        /// The `REPEAT` details; see [`RepeatStatement`].
1225        repeat: Box<RepeatStatement<X>>,
1226        /// Source location and node identity.
1227        meta: Meta,
1228    },
1229    /// A MySQL `LEAVE <label>` compound-body statement. Boxed for a uniform family shape
1230    /// (the payload alone exceeds the 24-byte enum budget once its own `meta` is added).
1231    Leave {
1232        /// The `LEAVE` details; see [`LeaveStatement`].
1233        leave: Box<LeaveStatement>,
1234        /// Source location and node identity.
1235        meta: Meta,
1236    },
1237    /// A MySQL `ITERATE <label>` compound-body statement. Boxed for a uniform family
1238    /// shape.
1239    Iterate {
1240        /// The `ITERATE` details; see [`IterateStatement`].
1241        iterate: Box<IterateStatement>,
1242        /// Source location and node identity.
1243        meta: Meta,
1244    },
1245    /// A MySQL `RETURN <expr>` compound-body statement (stored functions only). Boxed,
1246    /// like the other family payloads, to keep the enum within its size budget.
1247    Return {
1248        /// The `RETURN` details; see [`ReturnStatement`].
1249        return_statement: Box<ReturnStatement<X>>,
1250        /// Source location and node identity.
1251        meta: Meta,
1252    },
1253    /// A MySQL `OPEN <cursor>` compound-body statement. Boxed for a uniform family shape.
1254    OpenCursor {
1255        /// The `OPEN` details; see [`OpenCursorStatement`].
1256        open: Box<OpenCursorStatement>,
1257        /// Source location and node identity.
1258        meta: Meta,
1259    },
1260    /// A MySQL `FETCH [[NEXT] FROM] <cursor> INTO …` compound-body statement. Boxed for a
1261    /// uniform family shape.
1262    FetchCursor {
1263        /// The `FETCH` details; see [`FetchCursorStatement`].
1264        fetch: Box<FetchCursorStatement>,
1265        /// Source location and node identity.
1266        meta: Meta,
1267    },
1268    /// A MySQL `CLOSE <cursor>` compound-body statement. Boxed for a uniform family shape.
1269    CloseCursor {
1270        /// The `CLOSE` details; see [`CloseCursorStatement`].
1271        close: Box<CloseCursorStatement>,
1272        /// Source location and node identity.
1273        meta: Meta,
1274    },
1275    /// A MySQL `SIGNAL {SQLSTATE '…' | <condition-name>} [SET …]` statement — raise a
1276    /// condition. A top-level statement (its own `signal_diagnostics` gate) that also appears
1277    /// in stored-program bodies. Boxed, like the other family payloads, to keep the enum
1278    /// within its size budget.
1279    Signal {
1280        /// The `SIGNAL` details; see [`SignalStatement`].
1281        signal: Box<SignalStatement<X>>,
1282        /// Source location and node identity.
1283        meta: Meta,
1284    },
1285    /// A MySQL `RESIGNAL [{SQLSTATE '…' | <condition-name>}] [SET …]` statement — re-raise the
1286    /// current condition, optionally amended. Shares [`SignalStatement`] with
1287    /// [`Signal`](Self::Signal). Boxed, like the other family payloads, to keep the enum
1288    /// within its size budget.
1289    Resignal {
1290        /// The `RESIGNAL` details; see [`SignalStatement`].
1291        resignal: Box<SignalStatement<X>>,
1292        /// Source location and node identity.
1293        meta: Meta,
1294    },
1295    /// A MySQL `GET [CURRENT | STACKED] DIAGNOSTICS …` statement — read the diagnostics area.
1296    /// A top-level statement (its own `signal_diagnostics` gate) that also appears in
1297    /// stored-program bodies. Boxed, like the other family payloads, to keep the enum within
1298    /// its size budget.
1299    GetDiagnostics {
1300        /// The `GET DIAGNOSTICS` details; see [`GetDiagnosticsStatement`].
1301        get_diagnostics: Box<GetDiagnosticsStatement<X>>,
1302        /// Source location and node identity.
1303        meta: Meta,
1304    },
1305    /// Dialect extension node supplied by the extension type.
1306    Other {
1307        /// The dialect extension node value.
1308        ext: X,
1309        /// Source location and node identity.
1310        meta: Meta,
1311    },
1312}
1313
1314impl<X: Extension> Statement<X> {
1315    /// Borrow this statement as a query, when it is one.
1316    pub fn as_query(&self) -> Option<&Query<X>> {
1317        match self {
1318            Self::Query { query, .. } => Some(query),
1319            Self::CreateTable { .. }
1320            | Self::Insert { .. }
1321            | Self::Update { .. }
1322            | Self::Delete { .. }
1323            | Self::Merge { .. }
1324            | Self::Transaction { .. }
1325            | Self::Xa { .. }
1326            | Self::Session { .. }
1327            | Self::AccessControl { .. }
1328            | Self::AlterTable { .. }
1329            | Self::Drop { .. }
1330            | Self::CreateSchema { .. }
1331            | Self::CreateView { .. }
1332            | Self::RefreshMaterializedView { .. }
1333            | Self::CreateColocationGroup { .. }
1334            | Self::DropColocationGroup { .. }
1335            | Self::AlterView { .. }
1336            | Self::CreateIndex { .. }
1337            | Self::CreateFunction { .. }
1338            | Self::CreateProcedure { .. }
1339            | Self::AlterRoutine { .. }
1340            | Self::CreateEvent { .. }
1341            | Self::AlterEvent { .. }
1342            | Self::DropEvent { .. }
1343            | Self::DropDatabase { .. }
1344            | Self::DropIndex { .. }
1345            | Self::CreateDatabase { .. }
1346            | Self::DropRoutine { .. }
1347            | Self::DropTransform { .. }
1348            | Self::Truncate { .. }
1349            | Self::CommentOn { .. }
1350            | Self::Copy { .. }
1351            | Self::CopyInto { .. }
1352            | Self::Export { .. }
1353            | Self::Import { .. }
1354            | Self::Explain { .. }
1355            | Self::Describe { .. }
1356            | Self::Show { .. }
1357            | Self::Kill { .. }
1358            | Self::Handler { .. }
1359            | Self::Install { .. }
1360            | Self::Uninstall { .. }
1361            | Self::Shutdown { .. }
1362            | Self::Restart { .. }
1363            | Self::Clone { .. }
1364            | Self::ImportTable { .. }
1365            | Self::Help { .. }
1366            | Self::Binlog { .. }
1367            | Self::Pragma { .. }
1368            | Self::Attach { .. }
1369            | Self::Detach { .. }
1370            | Self::Checkpoint { .. }
1371            | Self::Load { .. }
1372            | Self::LoadData { .. }
1373            | Self::UpdateExtensions { .. }
1374            | Self::Vacuum { .. }
1375            | Self::Reindex { .. }
1376            | Self::Analyze { .. }
1377            | Self::TableMaintenance { .. }
1378            | Self::CacheIndex { .. }
1379            | Self::LoadIndex { .. }
1380            | Self::Rename { .. }
1381            | Self::Flush { .. }
1382            | Self::Purge { .. }
1383            | Self::Replication { .. }
1384            | Self::CreateUser { .. }
1385            | Self::AlterUser { .. }
1386            | Self::UserRoleList { .. }
1387            | Self::Use { .. }
1388            | Self::CreateTrigger { .. }
1389            | Self::CreateStoredTrigger { .. }
1390            | Self::CreateMacro { .. }
1391            | Self::CreateSecret { .. }
1392            | Self::DropSecret { .. }
1393            | Self::CreateType { .. }
1394            | Self::CreateVirtualTable { .. }
1395            | Self::CreateSequence { .. }
1396            | Self::CreateExtension { .. }
1397            | Self::AlterExtension { .. }
1398            | Self::CreateTablespace { .. }
1399            | Self::AlterTablespace { .. }
1400            | Self::DropTablespace { .. }
1401            | Self::CreateLogfileGroup { .. }
1402            | Self::AlterLogfileGroup { .. }
1403            | Self::DropLogfileGroup { .. }
1404            | Self::AlterObjectDepends { .. }
1405            | Self::AlterSystem { .. }
1406            | Self::AlterDatabase { .. }
1407            | Self::AlterDatabaseOptions { .. }
1408            | Self::CreateServer { .. }
1409            | Self::AlterServer { .. }
1410            | Self::DropServer { .. }
1411            | Self::AlterInstance { .. }
1412            | Self::CreateSpatialReferenceSystem { .. }
1413            | Self::DropSpatialReferenceSystem { .. }
1414            | Self::CreateResourceGroup { .. }
1415            | Self::AlterResourceGroup { .. }
1416            | Self::DropResourceGroup { .. }
1417            | Self::AlterSequence { .. }
1418            | Self::AlterObjectSchema { .. }
1419            | Self::Pivot { .. }
1420            | Self::Unpivot { .. }
1421            | Self::ShowRef { .. }
1422            | Self::Prepare { .. }
1423            | Self::Execute { .. }
1424            | Self::PrepareFrom { .. }
1425            | Self::ExecuteUsing { .. }
1426            | Self::Deallocate { .. }
1427            | Self::Call { .. }
1428            | Self::Do { .. }
1429            | Self::DoExpressions { .. }
1430            | Self::LockTables { .. }
1431            | Self::UnlockTables { .. }
1432            | Self::InstanceLock { .. }
1433            | Self::Compound { .. }
1434            | Self::If { .. }
1435            | Self::Case { .. }
1436            | Self::Loop { .. }
1437            | Self::While { .. }
1438            | Self::Repeat { .. }
1439            | Self::Leave { .. }
1440            | Self::Iterate { .. }
1441            | Self::Return { .. }
1442            | Self::OpenCursor { .. }
1443            | Self::FetchCursor { .. }
1444            | Self::CloseCursor { .. }
1445            | Self::Signal { .. }
1446            | Self::Resignal { .. }
1447            | Self::GetDiagnostics { .. }
1448            | Self::Other { .. } => None,
1449        }
1450    }
1451}