pub enum RoutineBody {
Expression(String),
Query(String),
Statements(Vec<String>),
Block(String),
}Expand description
The routine’s body, in the shape Razeri composed it.
Variants§
Expression(String)
A single expression the function’s value is.
Query(String)
A query whose rows the function returns.
Statements(Vec<String>)
Statements, in order, each as Razeri composed it — which means a
statement that needs a ; already carries one, and a block statement
carries the ; its own grammar puts inside it.
How they are separated, and how the block around them is opened and
closed, is still the engine’s business. An engine that ends a statement
some other way reads the last character rather than assuming: a ;
stripped off END IF; takes a keyword’s punctuation, not a separator.
Block(String)
A procedural block the design supplied already framed. Emit it as it stands, inside whatever this engine wraps a body in.
Trait Implementations§
Source§impl Clone for RoutineBody
impl Clone for RoutineBody
Source§impl Debug for RoutineBody
impl Debug for RoutineBody
impl Eq for RoutineBody
Source§impl PartialEq for RoutineBody
impl PartialEq for RoutineBody
impl StructuralPartialEq for RoutineBody
Auto Trait Implementations§
impl Forget for RoutineBody
impl Freeze for RoutineBody
impl Move for RoutineBody
impl RefUnwindSafe for RoutineBody
impl Send for RoutineBody
impl Sync for RoutineBody
impl Unpin for RoutineBody
impl UnsafeUnpin for RoutineBody
impl UnwindSafe for RoutineBody
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
Mutably borrows from an owned value. Read more