Skip to main content

Expr

Struct Expr 

Source
pub struct Expr(pub Expression);

Tuple Fields§

§0: Expression

Implementations§

Source§

impl Expr

Source

pub fn column(name: impl Into<String>) -> Self

Source

pub fn qualified(relation: impl Into<String>, name: impl Into<String>) -> Self

Source

pub fn value(value: impl Into<TypedValue>) -> Self

Source

pub fn star() -> Self

Source

pub fn navigation( root: impl Into<String>, path: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Source

pub fn function( name: impl Into<String>, arguments: impl IntoIterator<Item = Expr>, ) -> Self

Source

pub fn aggregate( name: impl Into<String>, arguments: impl IntoIterator<Item = Expr>, distinct: bool, filter: Option<Expr>, order_by: Vec<Order>, ) -> Self

Source

pub fn window(self, specification: WindowSpecification) -> Self

Source

pub fn cast(self, data_type: DataTypeDescriptor) -> Self

Source

pub fn alias(self, alias: impl Into<String>) -> Projection

Source

pub fn projection(self) -> Projection

Source

pub fn unary(self, operator: UnaryOperator) -> Self

Source

pub fn binary(self, operator: BinaryOperator, right: impl Into<Expr>) -> Self

Source

pub fn eq(self, right: impl Into<Expr>) -> Self

Source

pub fn ne(self, right: impl Into<Expr>) -> Self

Source

pub fn lt(self, right: impl Into<Expr>) -> Self

Source

pub fn lte(self, right: impl Into<Expr>) -> Self

Source

pub fn gt(self, right: impl Into<Expr>) -> Self

Source

pub fn gte(self, right: impl Into<Expr>) -> Self

Source

pub fn and(self, right: impl Into<Expr>) -> Self

Source

pub fn or(self, right: impl Into<Expr>) -> Self

Source

pub fn add(self, right: impl Into<Expr>) -> Self

Source

pub fn sub(self, right: impl Into<Expr>) -> Self

Source

pub fn mul(self, right: impl Into<Expr>) -> Self

Source

pub fn div(self, right: impl Into<Expr>) -> Self

Source

pub fn modulo(self, right: impl Into<Expr>) -> Self

Source

pub fn like(self, right: impl Into<Expr>) -> Self

Source

pub fn not_like(self, right: impl Into<Expr>) -> Self

Source

pub fn regexp(self, right: impl Into<Expr>) -> Self

Source

pub fn glob(self, right: impl Into<Expr>) -> Self

Source

pub fn is_distinct_from(self, right: impl Into<Expr>) -> Self

Source

pub fn is_not_distinct_from(self, right: impl Into<Expr>) -> Self

Source

pub fn not(self) -> Self

Source

pub fn is_null(self) -> Self

Source

pub fn is_not_null(self) -> Self

Source

pub fn between(self, lower: impl Into<Expr>, upper: impl Into<Expr>) -> Self

Source

pub fn not_between(self, lower: impl Into<Expr>, upper: impl Into<Expr>) -> Self

Source

pub fn in_list(self, values: impl IntoIterator<Item = impl Into<Expr>>) -> Self

Source

pub fn not_in_list( self, values: impl IntoIterator<Item = impl Into<Expr>>, ) -> Self

Source

pub fn in_subquery(self, query: QueryBuilder) -> Self

Source

pub fn not_in_subquery(self, query: QueryBuilder) -> Self

Source

pub fn tuple(values: impl IntoIterator<Item = Expr>) -> Self

Source

pub fn exists(query: QueryBuilder) -> Self

Source

pub fn not_exists(query: QueryBuilder) -> Self

Source

pub fn scalar_subquery(query: QueryBuilder) -> Self

Source

pub fn case( operand: Option<Expr>, branches: impl IntoIterator<Item = (Expr, Expr)>, otherwise: Option<Expr>, ) -> Self

Source

pub fn grouping(expressions: impl IntoIterator<Item = Expr>) -> Self

Source

pub fn asc(self) -> Order

Source

pub fn desc(self) -> Order

Trait Implementations§

Source§

impl Clone for Expr

Source§

fn clone(&self) -> Expr

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Expr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Expr

Source§

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 From<&DynamicColumn> for Expr

Source§

fn from(value: &DynamicColumn) -> Self

Converts to this type from the input type.
Source§

impl<T, Owner> From<&TypedColumn<T, Owner>> for Expr

Source§

fn from(value: &TypedColumn<T, Owner>) -> Self

Converts to this type from the input type.
Source§

impl From<&str> for Expr

Source§

fn from(value: &str) -> Self

Converts to this type from the input type.
Source§

impl From<DynamicColumn> for Expr

Source§

fn from(value: DynamicColumn) -> Self

Converts to this type from the input type.
Source§

impl From<Expression> for Expr

Source§

fn from(value: Expression) -> Self

Converts to this type from the input type.
Source§

impl<T> From<Reference<T>> for Expr

Source§

fn from(reference: Reference<T>) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Expr

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl<T, Owner> From<TypedColumn<T, Owner>> for Expr

Source§

fn from(value: TypedColumn<T, Owner>) -> Self

Converts to this type from the input type.
Source§

impl<T, Root> From<TypedNavigation<T, Root>> for Expr

Source§

fn from(value: TypedNavigation<T, Root>) -> Self

Converts to this type from the input type.
Source§

impl From<TypedValue> for Expr

Source§

fn from(value: TypedValue) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for Expr

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Expr

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Expr

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Expr

Source§

fn eq(&self, other: &Expr) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Expr

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> CompactArcDrop for T

Source§

unsafe fn drop_and_dealloc(ptr: *mut u8)

Drop the contained data and deallocate the header+data allocation. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V