pub enum MacroBody {
Scalar(String),
Table(String),
}Expand description
The body of a SQL macro: a scalar expression or a table query.
Constructed implicitly by SqlMacro::scalar and SqlMacro::table.
Variants§
Scalar(String)
A SQL expression — generates AS (expression).
Example: "greatest(lo, least(hi, x))"
Table(String)
A SQL query — generates AS TABLE query.
Example: "SELECT * FROM tbl WHERE active = true"
Trait Implementations§
impl Eq for MacroBody
impl StructuralPartialEq for MacroBody
Auto Trait Implementations§
impl Freeze for MacroBody
impl RefUnwindSafe for MacroBody
impl Send for MacroBody
impl Sync for MacroBody
impl Unpin for MacroBody
impl UnsafeUnpin for MacroBody
impl UnwindSafe for MacroBody
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