Struct sql_from_models_parser::ast::Case
source · pub struct Case {
pub operand: Option<Box<Expr>>,
pub conditions: Vec<Expr>,
pub results: Vec<Expr>,
pub else_result: Option<Box<Expr>>,
}
Expand description
CASE [<operand>] WHEN <condition> THEN <result> ... [ELSE <result>] END
Note we only recognize a complete single expression as <condition>
,
not < 0
nor 1, 2, 3
as allowed in a <simple when clause>
per
https://jakewheat.github.io/sql-overview/sql-2011-foundation-grammar.html#simple-when-clause
Fields§
§operand: Option<Box<Expr>>
§conditions: Vec<Expr>
§results: Vec<Expr>
§else_result: Option<Box<Expr>>
Trait Implementations§
source§impl PartialEq<Case> for Case
impl PartialEq<Case> for Case
impl Eq for Case
impl StructuralEq for Case
impl StructuralPartialEq for Case
Auto Trait Implementations§
impl RefUnwindSafe for Case
impl Send for Case
impl Sync for Case
impl Unpin for Case
impl UnwindSafe for Case
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