pub struct ExplainStatement<X: Extension = NoExt> {
pub spelling: ExplainKeyword,
pub parenthesized: bool,
pub options: ThinVec<ExplainOption>,
pub statement: Box<Statement<X>>,
pub meta: Meta,
}Expand description
An EXPLAIN statement: report the planner’s query plan for an inner statement.
Covers both option spellings: the legacy EXPLAIN [ANALYZE] [VERBOSE] <statement> keyword prefix and the modern parenthesized list EXPLAIN ( option [, ...] ) <statement>. They share one options list; the
parenthesized surface tag records which
spelling was written so the construct round-trips, since the legacy prefix can
only carry Analyze/Verbose.
MySQL spells the same query-plan statement EXPLAIN, DESCRIBE, or DESC
interchangeably (DESCRIBE SELECT 1 is EXPLAIN SELECT 1), so the
leading keyword rides the spelling surface tag; PostgreSQL only
has EXPLAIN, so its parser always sets Explain. The
separate MySQL table-metadata overload (DESCRIBE <table>) is a different shape —
a table name rather than an inner statement — and rides its own
DescribeStatement, not this node.
Which inner statements PostgreSQL actually allows after EXPLAIN (a query,
INSERT/UPDATE/DELETE, CREATE TABLE AS, …) is a semantic restriction left
to a later pass; the grammar accepts any Statement.
Fields§
§spelling: ExplainKeywordWhich leading keyword spelled the statement (EXPLAIN/DESCRIBE/DESC);
always Explain outside MySQL.
parenthesized: boolWhether the parenthesized form was present in the source.
options: ThinVec<ExplainOption>Options supplied in source order.
statement: Box<Statement<X>>Statement governed by this node.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl<X: Clone + Extension> Clone for ExplainStatement<X>
impl<X: Clone + Extension> Clone for ExplainStatement<X>
Source§fn clone(&self) -> ExplainStatement<X>
fn clone(&self) -> ExplainStatement<X>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'de, X> Deserialize<'de> for ExplainStatement<X>where
X: Deserialize<'de> + Extension,
impl<'de, X> Deserialize<'de> for ExplainStatement<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 ExplainStatement<X>
Source§impl<X: Extension + Render> Render for ExplainStatement<X>
impl<X: Extension + Render> Render for ExplainStatement<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 moreSource§impl<X> Serialize for ExplainStatement<X>
impl<X> Serialize for ExplainStatement<X>
Source§impl<X: Extension> Spanned for ExplainStatement<X>
impl<X: Extension> Spanned for ExplainStatement<X>
impl<X: PartialEq + Extension> StructuralPartialEq for ExplainStatement<X>
Auto Trait Implementations§
impl<X> Freeze for ExplainStatement<X>
impl<X> RefUnwindSafe for ExplainStatement<X>where
X: RefUnwindSafe,
impl<X> Send for ExplainStatement<X>where
X: Send,
impl<X> Sync for ExplainStatement<X>where
X: Sync,
impl<X> Unpin for ExplainStatement<X>
impl<X> UnsafeUnpin for ExplainStatement<X>
impl<X> UnwindSafe for ExplainStatement<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.