pub struct Conditional {
pub operand: Option<Box<Expression>>,
pub whens: Vec<CaseWhen>,
pub else_result: Option<Box<Expression>>,
}Expand description
CASE [operand] WHEN ... THEN ... [ELSE ...] END.
PHP: Utopia\Query\AST\Expression\Conditional (operand, whens, else).
Fields§
§operand: Option<Box<Expression>>The operand of a simple CASE.
whens: Vec<CaseWhen>The WHEN branches.
else_result: Option<Box<Expression>>The ELSE result.
PHP: $else.
Trait Implementations§
Source§impl Clone for Conditional
impl Clone for Conditional
Source§impl Debug for Conditional
impl Debug for Conditional
Source§impl From<Conditional> for Expression
impl From<Conditional> for Expression
Source§fn from(node: Conditional) -> Self
fn from(node: Conditional) -> Self
The node as an expression.
Source§impl PartialEq for Conditional
impl PartialEq for Conditional
impl StructuralPartialEq for Conditional
Auto Trait Implementations§
impl Forget for Conditional
impl Freeze for Conditionalwhere
*const Expression is !null: Freeze,
PhantomData<Expression>: Freeze,
*const u8 is !null: Freeze,
PhantomData<CaseWhen>: Freeze,
impl Move for Conditional
impl RefUnwindSafe for Conditionalwhere
Atomic<*mut ()>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
OnceLock<Index>: RefUnwindSafe,
Atomic<u8>: RefUnwindSafe,
impl Send for Conditional
impl Sync for Conditional
impl Unpin for Conditional
impl UnsafeUnpin for Conditionalwhere
*const Expression is !null: UnsafeUnpin,
PhantomData<Expression>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<CaseWhen>: UnsafeUnpin,
impl UnwindSafe for Conditional
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