pub enum Expr {
Show 33 variants
Literal(Literal),
Param(Param),
Idiom(Idiom),
Table(String),
Mock(Mock),
Block(Box<Block>),
Constant(Constant),
Prefix {
op: PrefixOperator,
expr: Box<Expr>,
},
Postfix {
expr: Box<Expr>,
op: PostfixOperator,
},
Binary {
left: Box<Expr>,
op: BinaryOperator,
right: Box<Expr>,
},
FunctionCall(Box<FunctionCall>),
Closure(Box<Closure>),
Break,
Continue,
Throw(Box<Expr>),
Return(Box<OutputStatement>),
IfElse(Box<IfelseStatement>),
Select(Box<SelectStatement>),
Create(Box<CreateStatement>),
Update(Box<UpdateStatement>),
Delete(Box<DeleteStatement>),
Relate(Box<RelateStatement>),
Insert(Box<InsertStatement>),
Define(Box<DefineStatement>),
Remove(Box<RemoveStatement>),
Rebuild(Box<RebuildStatement>),
Upsert(Box<UpsertStatement>),
Alter(Box<AlterStatement>),
Info(Box<InfoStatement>),
Foreach(Box<ForeachStatement>),
Let(Box<SetStatement>),
Sleep(Box<SleepStatement>),
Explain {
format: ExplainFormat,
analyze: bool,
statement: Box<Expr>,
},
}Variants§
Literal(Literal)
Param(Param)
Idiom(Idiom)
Table(String)
Mock(Mock)
Block(Box<Block>)
Constant(Constant)
Prefix
Postfix
Binary
FunctionCall(Box<FunctionCall>)
Closure(Box<Closure>)
Break
Continue
Throw(Box<Expr>)
Return(Box<OutputStatement>)
IfElse(Box<IfelseStatement>)
Select(Box<SelectStatement>)
Create(Box<CreateStatement>)
Update(Box<UpdateStatement>)
Delete(Box<DeleteStatement>)
Relate(Box<RelateStatement>)
Insert(Box<InsertStatement>)
Define(Box<DefineStatement>)
Remove(Box<RemoveStatement>)
Rebuild(Box<RebuildStatement>)
Upsert(Box<UpsertStatement>)
Alter(Box<AlterStatement>)
Info(Box<InfoStatement>)
Foreach(Box<ForeachStatement>)
Let(Box<SetStatement>)
Sleep(Box<SleepStatement>)
Explain
Implementations§
Source§impl Expr
impl Expr
pub fn to_idiom(&self) -> Idiom
pub fn from_public_value(value: PublicValue) -> Self
Sourcepub fn needs_parentheses(&self) -> bool
pub fn needs_parentheses(&self) -> bool
Returns if this expression needs to be parenthesized when inside another expression.
Sourcepub fn has_left_none_null(&self) -> bool
pub fn has_left_none_null(&self) -> bool
Returns true if there is a NONE or NULL value in the left most spot when formatting.
returns true for NONE + 1, NULL(), NONE, NULL.. etc.
Required for proper formatting when NONE can conflict with a clause.
pub fn has_left_minus(&self) -> bool
pub fn has_left_idiom(&self) -> bool
Trait Implementations§
impl Eq for Expr
impl StructuralPartialEq for Expr
Auto Trait Implementations§
impl !Freeze for Expr
impl RefUnwindSafe for Expr
impl Send for Expr
impl Sync for Expr
impl Unpin for Expr
impl UnsafeUnpin for Expr
impl UnwindSafe for Expr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more