pub enum Definer {
Account {
user: Ident,
host: Option<Ident>,
meta: Meta,
},
CurrentUser {
parens: bool,
meta: Meta,
},
}Expand description
The MySQL DEFINER = <user> clause prefixing a routine (and, on other tickets, a
view/trigger/event) definition — the account the object’s SQL SECURITY DEFINER context
resolves to.
This is the measured minimal account surface the routine family needs: the bare
<user>[@<host>] account name and the CURRENT_USER [()] self-reference, the two forms
the corpus and the oracle exercise. The full MySQL account-name axis — the quoting-nuance
matrix, role grants, and the IDENTIFIED BY authentication tail — is owned by
parse-mysql-user-role-ddl; this node deliberately stops at the account reference a
routine header carries, and that ticket widens it (or lifts it to a shared account node)
without reshaping the routine statements that hold it.
Variants§
Account
DEFINER = <user>[@<host>] — a named account. The user and optional host are
each an Ident so both the bare (root) and quoted ('root'@'localhost') source
spellings round-trip from their spans.
Fields
CurrentUser
DEFINER = CURRENT_USER [()] — the current user at definition time.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Definer
impl<'de> Deserialize<'de> for Definer
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 Definer
Source§impl Render for Definer
impl Render for Definer
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 StructuralPartialEq for Definer
Auto Trait Implementations§
impl Freeze for Definer
impl RefUnwindSafe for Definer
impl Send for Definer
impl Sync for Definer
impl Unpin for Definer
impl UnsafeUnpin for Definer
impl UnwindSafe for Definer
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.