Skip to main content

Unary

Struct Unary 

Source
pub struct Unary<L, T> { /* private fields */ }
Expand description

A typed unary expression.

Trait Implementations§

Source§

impl<'e, L, T> AsExpression<T> for Unary<L, T>
where T: Boolean, L: LowerCompatible<T>,

Source§

type Expression<'s> = &'s Unary<L, T> where Unary<L, T>: 's

Concrete expression type returned for a borrowed value.
Source§

fn as_expression<'s>( &'s self, ) -> <Unary<L, T> as AsExpression<T>>::Expression<'s>

Borrows self as a typed expression.
Source§

impl<L, T> Expression for Unary<L, T>
where T: Boolean, L: LowerCompatible<T>,

Source§

type Type = T

SQL type produced by this expression.
Source§

fn lower(&self, ctx: &mut LowerCtx<'_>) -> usize

Appends the expression to the lowering context and returns its subtree size.

Auto Trait Implementations§

§

impl<L, T> Freeze for Unary<L, T>
where L: Freeze,

§

impl<L, T> RefUnwindSafe for Unary<L, T>

§

impl<L, T> Send for Unary<L, T>
where L: Send, T: Send,

§

impl<L, T> Sync for Unary<L, T>
where L: Sync, T: Sync,

§

impl<L, T> Unpin for Unary<L, T>
where L: Unpin, T: Unpin,

§

impl<L, T> UnsafeUnpin for Unary<L, T>
where L: UnsafeUnpin,

§

impl<L, T> UnwindSafe for Unary<L, T>
where L: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Alias for T
where T: LowerProject,

Source§

fn alias(self, alias: &'static str) -> Aliased<Self>
where Self: Sized,

Returns the same value tagged with the provided alias.
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, V> BetweenExt<T> for V
where T: Orderable, V: Expression<Type = T>,

Source§

fn between<L, H>(self, low: L, high: H) -> Between<Self, L, H>
where L: LowerCompatible<T>, H: LowerCompatible<T>,

Source§

fn not_between<L, H>(self, low: L, high: H) -> Between<Self, L, H>
where L: LowerCompatible<T>, H: LowerCompatible<T>,

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, V> EqExt<T> for V
where T: Comparable, V: Expression<Type = T>,

Source§

fn eq<E>(self, other: E) -> Binary<Eq, Self, E>
where E: LowerCompatible<T>,

Source§

fn neq<E>(self, other: E) -> Binary<Neq, Self, E>
where E: LowerCompatible<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<E> In for E
where E: Expression,

Source§

fn one_of<R>(self, list: R) -> InList<Self, R>
where R: LowerIn<Self::Type>,

Source§

fn in_<R>(self, list: R) -> InList<Self, R>
where R: LowerIn<Self::Type>,

Source§

fn not_in<R>(self, list: R) -> InList<Self, R>
where R: LowerIn<Self::Type>,

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, V> IsNull<T> for V
where T: Comparable, V: Expression<Type = Nullable<T>>,

Source§

fn is_null(self) -> Postfix<Self>

Source§

fn is_not_null(self) -> Postfix<Self>

Source§

impl<T, V> IsPredicate<T> for V
where T: Boolean, V: Expression<Type = T>,

Source§

fn is_true(self) -> Postfix<Self>

Source§

fn is_false(self) -> Postfix<Self>

Source§

impl<T, V> LikeExt<T> for V
where T: Likeable, V: Expression<Type = T>,

Source§

fn like<E>(self, other: E) -> Like<Self, E>
where E: LowerCompatible<T>,

Source§

fn not_like<E>(self, other: E) -> Like<Self, E>
where E: LowerCompatible<T>,

Source§

impl<E> LowerAggregate for E
where E: Expression,

Source§

fn lower_aggregate(self, ctx: &mut LowerCtx<'_>)

Source§

impl<E> LowerCount for E
where E: LowerAggregate,

Source§

fn lower_count(self, ctx: &mut LowerCtx<'_>)

Source§

impl<E> LowerGroupBy for E
where E: Expression,

Source§

fn lower_group_by(self, ctx: &mut LowerCtx<'_>)

Appends the grouping node or nodes to the lowering context.
Source§

impl<E> LowerOrderBy for E
where E: Expression,

Source§

fn lower_order_by(self, ctx: &mut LowerCtx<'_>)

Appends the ordering node or nodes to the lowering context.
Source§

impl<E> LowerProject for E
where E: Expression,

Source§

fn lower_project(self, ctx: &mut LowerCtx<'_>)

Appends the projection to the lowering context.
Source§

impl<E> Order for E
where E: LowerOrderBy,

Source§

fn asc(self) -> OrderNode<E>

Marks the value as ascending.
Source§

fn desc(self) -> OrderNode<E>

Marks the value as descending.
Source§

impl<T, V> OrderExt<T> for V
where T: Orderable, V: Expression<Type = T>,

Source§

fn lt<E>(self, other: E) -> Binary<Lt, Self, E>
where E: LowerCompatible<T>,

Source§

fn lte<E>(self, other: E) -> Binary<Lte, Self, E>
where E: LowerCompatible<T>,

Source§

fn gt<E>(self, other: E) -> Binary<Gt, Self, E>
where E: LowerCompatible<T>,

Source§

fn gte<E>(self, other: E) -> Binary<Gte, Self, E>
where E: LowerCompatible<T>,

Source§

impl<T, V> PredicateExt<T> for V
where T: Boolean, V: Expression<Type = T>,

Source§

fn and<E>(self, other: E) -> Binary<And, Self, E>
where E: LowerCompatible<T>,

Source§

fn or<E>(self, other: E) -> Binary<Or, Self, E>
where E: LowerCompatible<T>,

Source§

impl<Key> RelationForeignKey<Key> for Key

Source§

fn from_relation_key(key: Key) -> Key

Source§

impl<Key, T> RelationForeignKeyRef<Key> for T
where Key: Clone, T: RelationForeignKey<Key>,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.