pub enum PrepareSource {
Text {
source: Literal,
meta: Meta,
},
Variable {
name: Ident,
meta: Meta,
},
}Expand description
The source of a MySQL PrepareFromStatement — sql_yacc.yy prepare_src, either an
inline string literal or a user-variable reference. A spanned enum node: each arm
round-trips its own spelling, so the two are recorded as written rather than folded to a
single string.
Variants§
Text
PREPARE name FROM '<text>' — the opaque statement source string (TEXT_STRING_sys),
kept verbatim and never re-parsed here (like DoArg::Body). Its spelling — quote
style and escapes — round-trips from the Literal.
Fields
source: LiteralThe statement-source Literal (a LiteralKind::String).
Variable
PREPARE name FROM @<var> — the source read from a user variable at prepare time
('@' ident_or_text, MySQL’s prepared_stmt_code_is_varref). The variable’s name is
held without the @ sigil, its quote style preserved for round-trip; @@-prefixed
system variables are rejected by the parser (ER_PARSE_ERROR on mysql:8).
Trait Implementations§
Source§impl Clone for PrepareSource
impl Clone for PrepareSource
Source§fn clone(&self) -> PrepareSource
fn clone(&self) -> PrepareSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PrepareSource
impl Debug for PrepareSource
Source§impl<'de> Deserialize<'de> for PrepareSource
impl<'de> Deserialize<'de> for PrepareSource
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 Eq for PrepareSource
Source§impl Hash for PrepareSource
impl Hash for PrepareSource
Source§impl PartialEq for PrepareSource
impl PartialEq for PrepareSource
Source§impl Render for PrepareSource
impl Render for PrepareSource
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 Serialize for PrepareSource
impl Serialize for PrepareSource
impl StructuralPartialEq for PrepareSource
Auto Trait Implementations§
impl Freeze for PrepareSource
impl RefUnwindSafe for PrepareSource
impl Send for PrepareSource
impl Sync for PrepareSource
impl Unpin for PrepareSource
impl UnsafeUnpin for PrepareSource
impl UnwindSafe for PrepareSource
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.