pub enum Expr {
Column(ColumnRef),
Value(SqlValue),
Binary {
left: Box<Expr>,
op: BinaryOp,
right: Box<Expr>,
},
Unary {
op: UnaryOp,
expr: Box<Expr>,
},
Function {
name: String,
args: Vec<Expr>,
},
}Variants§
Implementations§
Source§impl Expr
impl Expr
pub fn column<E: Entity>(column: EntityColumn<E>) -> Self
pub fn column_as<E: Entity>( column: EntityColumn<E>, alias: &'static str, ) -> Self
pub const fn value(value: SqlValue) -> Self
pub fn binary(left: Expr, op: BinaryOp, right: Expr) -> Self
pub fn unary(op: UnaryOp, expr: Expr) -> Self
pub fn function(name: impl Into<String>, args: Vec<Expr>) -> Self
Trait Implementations§
Source§impl<E: Entity> From<EntityColumn<E>> for Expr
impl<E: Entity> From<EntityColumn<E>> for Expr
Source§fn from(value: EntityColumn<E>) -> Self
fn from(value: EntityColumn<E>) -> Self
Converts to this type from the input type.
Source§impl From<Expr> for SelectProjection
impl From<Expr> for SelectProjection
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