pub struct Excluded<C> { /* private fields */ }Expand description
Wraps a column to reference its value from the proposed insert row (the EXCLUDED row in ON CONFLICT DO UPDATE SET).
Trait Implementations§
impl<C: Copy> Copy for Excluded<C>
Source§impl<'a, V, C> Expr<'a, V> for Excluded<C>
impl<'a, V, C> Expr<'a, V> for Excluded<C>
Source§type Aggregate = <C as Expr<'a, V>>::Aggregate
type Aggregate = <C 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>where
Self: Sized,
fn into_expr_sql(self) -> SQL<'a, V>where
Self: Sized,
Render this value as a scalar expression, consuming it when useful.
Auto Trait Implementations§
impl<C> Freeze for Excluded<C>where
C: Freeze,
impl<C> RefUnwindSafe for Excluded<C>where
C: RefUnwindSafe,
impl<C> Send for Excluded<C>where
C: Send,
impl<C> Sync for Excluded<C>where
C: Sync,
impl<C> Unpin for Excluded<C>where
C: Unpin,
impl<C> UnsafeUnpin for Excluded<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for Excluded<C>where
C: 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