pub struct ConditionalStatementBlock {
pub start_token: AttachedToken,
pub condition: Option<Expr>,
pub then_token: Option<AttachedToken>,
pub conditional_statements: ConditionalStatements,
}
Expand description
A block within a Statement::Case or Statement::If-like statement
Example 1:
WHEN EXISTS(SELECT 1) THEN SELECT 1;
Example 2:
IF TRUE THEN SELECT 1; SELECT 2;
Example 3:
ELSE SELECT 1; SELECT 2;
Fields§
§start_token: AttachedToken
§condition: Option<Expr>
§then_token: Option<AttachedToken>
§conditional_statements: ConditionalStatements
Implementations§
Source§impl ConditionalStatementBlock
impl ConditionalStatementBlock
pub fn statements(&self) -> &Vec<Statement>
Trait Implementations§
Source§impl Clone for ConditionalStatementBlock
impl Clone for ConditionalStatementBlock
Source§fn clone(&self) -> ConditionalStatementBlock
fn clone(&self) -> ConditionalStatementBlock
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ConditionalStatementBlock
impl Debug for ConditionalStatementBlock
Source§impl<'de> Deserialize<'de> for ConditionalStatementBlock
impl<'de> Deserialize<'de> for ConditionalStatementBlock
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ConditionalStatementBlock
impl Display for ConditionalStatementBlock
Source§impl Hash for ConditionalStatementBlock
impl Hash for ConditionalStatementBlock
Source§impl Ord for ConditionalStatementBlock
impl Ord for ConditionalStatementBlock
Source§fn cmp(&self, other: &ConditionalStatementBlock) -> Ordering
fn cmp(&self, other: &ConditionalStatementBlock) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for ConditionalStatementBlock
impl PartialOrd for ConditionalStatementBlock
Source§impl Spanned for ConditionalStatementBlock
impl Spanned for ConditionalStatementBlock
Source§impl Visit for ConditionalStatementBlock
impl Visit for ConditionalStatementBlock
Source§impl VisitMut for ConditionalStatementBlock
impl VisitMut for ConditionalStatementBlock
fn visit<V: VisitorMut>(&mut self, visitor: &mut V) -> ControlFlow<V::Break>
impl Eq for ConditionalStatementBlock
impl StructuralPartialEq for ConditionalStatementBlock
Auto Trait Implementations§
impl Freeze for ConditionalStatementBlock
impl RefUnwindSafe for ConditionalStatementBlock
impl Send for ConditionalStatementBlock
impl Sync for ConditionalStatementBlock
impl Unpin for ConditionalStatementBlock
impl UnwindSafe for ConditionalStatementBlock
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