pub struct AliasedExpr<E> { /* private fields */ }Expand description
An expression aliased with AS "name".
Preserves the original expression’s type information (ExprValueType,
Expr, etc.) so that aliased columns in SELECT tuples still infer
the correct row type.
Trait Implementations§
Source§impl<E: Clone> Clone for AliasedExpr<E>
impl<E: Clone> Clone for AliasedExpr<E>
Source§fn clone(&self) -> AliasedExpr<E>
fn clone(&self) -> AliasedExpr<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<E: Copy> Copy for AliasedExpr<E>
Source§impl<E: Debug> Debug for AliasedExpr<E>
impl<E: Debug> Debug for AliasedExpr<E>
Source§impl<'a, V, E> Expr<'a, V> for AliasedExpr<E>
impl<'a, V, E> Expr<'a, V> for AliasedExpr<E>
Source§type Aggregate = <E as Expr<'a, V>>::Aggregate
type Aggregate = <E as Expr<'a, V>>::Aggregate
Whether this is an aggregate (COUNT, SUM) or scalar expression.
Source§fn to_expr_sql(&self) -> SQL<'a, V>
fn to_expr_sql(&self) -> SQL<'a, V>
Render this value as a scalar expression by reference. Read more
Source§fn into_expr_sql(self) -> SQL<'a, V>
fn into_expr_sql(self) -> SQL<'a, V>
Render this value as a scalar expression, consuming it when useful.
Source§impl<E: ExprValueType> ExprValueType for AliasedExpr<E>
impl<E: ExprValueType> ExprValueType for AliasedExpr<E>
type ValueType = <E as ExprValueType>::ValueType
Source§impl<E: GroupByIdentity> GroupByIdentity for AliasedExpr<E>
impl<E: GroupByIdentity> GroupByIdentity for AliasedExpr<E>
type Identity = <E as GroupByIdentity>::Identity
Source§impl<E: HasAggStatus> HasAggStatus for AliasedExpr<E>
impl<E: HasAggStatus> HasAggStatus for AliasedExpr<E>
type Status = <E as HasAggStatus>::Status
Source§impl<E> IntoSelectTarget for AliasedExpr<E>where
E: ExprValueType,
impl<E> IntoSelectTarget for AliasedExpr<E>where
E: ExprValueType,
type Marker = SelectCols<(AliasedExpr<E>,)>
Source§impl<'a, V, E> ToSQL<'a, V> for AliasedExpr<E>
impl<'a, V, E> ToSQL<'a, V> for AliasedExpr<E>
Auto Trait Implementations§
impl<E> Freeze for AliasedExpr<E>where
E: Freeze,
impl<E> RefUnwindSafe for AliasedExpr<E>where
E: RefUnwindSafe,
impl<E> Send for AliasedExpr<E>where
E: Send,
impl<E> Sync for AliasedExpr<E>where
E: Sync,
impl<E> Unpin for AliasedExpr<E>where
E: Unpin,
impl<E> UnsafeUnpin for AliasedExpr<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for AliasedExpr<E>where
E: UnwindSafe,
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<'a, V, L, R> ComparisonOperand<'a, V, L> for R
impl<'a, V, L, R> ComparisonOperand<'a, V, L> for R
Source§impl<'a, V, E> ExprExt<'a, V> for E
impl<'a, V, E> ExprExt<'a, V> for E
Source§fn eq<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn eq<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
Equality comparison (
=). Read moreSource§fn ne<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn ne<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
Inequality comparison (
<>). Read moreSource§fn gt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn gt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
Greater-than comparison (
>). Read moreSource§fn ge<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn ge<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
Greater-than-or-equal comparison (
>=). Read moreSource§fn lt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn lt<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
Less-than comparison (
<). Read moreSource§fn le<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn le<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
Less-than-or-equal comparison (
<=). Read moreSource§fn like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType> + Textual,
<R as ComparisonOperand<'a, V, Self>>::SQLType: Textual,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType> + Textual,
<R as ComparisonOperand<'a, V, Self>>::SQLType: Textual,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
LIKE pattern matching. Read more
Source§fn not_like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType> + Textual,
<R as ComparisonOperand<'a, V, Self>>::SQLType: Textual,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn not_like<R>(
self,
pattern: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType> + Textual,
<R as ComparisonOperand<'a, V, Self>>::SQLType: Textual,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
NOT LIKE pattern matching. Read more
Source§fn is_null(
self,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn is_null( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
IS NULL check. Read more
Source§fn is_not_null(
self,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn is_not_null( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
IS NOT NULL check. Read more
Source§fn between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output as AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
L: ComparisonOperand<'a, V, Self>,
H: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<L as ComparisonOperand<'a, V, Self>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>,
<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output: AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output as AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
L: ComparisonOperand<'a, V, Self>,
H: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<L as ComparisonOperand<'a, V, Self>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>,
<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output: AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>,
BETWEEN comparison. Read more
Source§fn not_between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output as AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
L: ComparisonOperand<'a, V, Self>,
H: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<L as ComparisonOperand<'a, V, Self>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>,
<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output: AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn not_between<L, H>(
self,
low: L,
high: H,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output as AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
L: ComparisonOperand<'a, V, Self>,
H: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<L as ComparisonOperand<'a, V, Self>>::SQLType> + Compatible<<H as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>,
<Self::Aggregate as AggOr<<L as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output: AggOr<<H as ComparisonOperand<'a, V, Self>>::Aggregate>,
NOT BETWEEN comparison. Read more
Source§fn in_array<I, R>(
self,
values: I,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn in_array<I, R>( self, values: I, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
IN array check. Read more
Source§fn not_in_array<I, R>(
self,
values: I,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn not_in_array<I, R>( self, values: I, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
NOT IN array check. Read more
Source§fn in_subquery<S>(
self,
subquery: S,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
IN subquery check.
Source§fn not_in_subquery<S>(
self,
subquery: S,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn not_in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
NOT IN subquery check.
Source§fn is_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn is_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
IS DISTINCT FROM - NULL-safe inequality comparison. Read more
Source§fn is_not_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
fn is_not_distinct_from<R>(
self,
other: R,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, <Self::Aggregate as AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>>::Output>where
R: ComparisonOperand<'a, V, Self>,
Self::SQLType: Compatible<<R as ComparisonOperand<'a, V, Self>>::SQLType>,
Self::Aggregate: AggOr<<R as ComparisonOperand<'a, V, Self>>::Aggregate>,
IS NOT DISTINCT FROM - NULL-safe equality comparison. Read more
Source§fn is_true(
self,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn is_true( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
IS TRUE - boolean test that handles NULL. Read more
Source§fn is_false(
self,
) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
fn is_false( self, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
IS FALSE - boolean test that handles NULL. Read more