pub struct CreateProcedure<X: Extension = NoExt> {
pub definer: Option<Box<Definer>>,
pub if_not_exists: bool,
pub name: ObjectName,
pub params: ThinVec<FunctionParam<X>>,
pub characteristics: ThinVec<FunctionOption<X>>,
pub body: Box<Statement<X>>,
pub meta: Meta,
}Expand description
CREATE [DEFINER = <user>] PROCEDURE [IF NOT EXISTS] <name> ( [<param> [, …]] ) [<characteristic> …] <routine_body> — the MySQL stored-procedure definition (SQL/PSM).
A distinct node from CreateFunction: a procedure has no RETURNS type, its body may
not contain RETURN (the routine family enforces ER_SP_BADRETURN), and it is invoked by
CALL rather than in an expression. It shares the routine vocabulary — the parameter
list reuses FunctionParam (with its IN/OUT/INOUT FunctionParamMode) and the
characteristic list reuses FunctionOption (LANGUAGE/COMMENT/DETERMINISTIC/data
access/SQL SECURITY) — but not a statement shape. The body is a single
MySQL body statement (typically a Statement::Compound
block), parsed through the parse_body_statement seam and boxed because Statement is
large.
Fields§
§definer: Option<Box<Definer>>The optional DEFINER = <user> clause; None when omitted. Boxed (the rare fat
field pays only a null pointer when absent), like CreateFunction::definer.
if_not_exists: boolWhether the IF NOT EXISTS guard was written (MySQL 8.0.29+).
name: ObjectNameThe procedure name.
params: ThinVec<FunctionParam<X>>The parameter list, in source order (always parenthesized, possibly empty).
characteristics: ThinVec<FunctionOption<X>>The routine characteristics, in source order (LANGUAGE/COMMENT/DETERMINISTIC/
data-access/SQL SECURITY), carried on the shared FunctionOption axis.
body: Box<Statement<X>>The routine body — one MySQL body statement, usually a compound block.
meta: MetaSource location and node identity.
Trait Implementations§
Source§impl<X: Clone + Extension> Clone for CreateProcedure<X>
impl<X: Clone + Extension> Clone for CreateProcedure<X>
Source§fn clone(&self) -> CreateProcedure<X>
fn clone(&self) -> CreateProcedure<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 CreateProcedure<X>where
X: Deserialize<'de> + Extension,
impl<'de, X> Deserialize<'de> for CreateProcedure<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 CreateProcedure<X>
Source§impl<X: Extension + Render> Render for CreateProcedure<X>
impl<X: Extension + Render> Render for CreateProcedure<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 CreateProcedure<X>
impl<X> Serialize for CreateProcedure<X>
Source§impl<X: Extension> Spanned for CreateProcedure<X>
impl<X: Extension> Spanned for CreateProcedure<X>
impl<X: PartialEq + Extension> StructuralPartialEq for CreateProcedure<X>
Auto Trait Implementations§
impl<X> Freeze for CreateProcedure<X>
impl<X> RefUnwindSafe for CreateProcedure<X>where
X: RefUnwindSafe,
impl<X> Send for CreateProcedure<X>where
X: Send,
impl<X> Sync for CreateProcedure<X>where
X: Sync,
impl<X> Unpin for CreateProcedure<X>where
X: Unpin,
impl<X> UnsafeUnpin for CreateProcedure<X>
impl<X> UnwindSafe for CreateProcedure<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.