Skip to main content

Excluded

Struct Excluded 

Source
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§

Source§

impl<C: Clone> Clone for Excluded<C>

Source§

fn clone(&self) -> Excluded<C>

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<C: Copy> Copy for Excluded<C>

Source§

impl<C: Debug> Debug for Excluded<C>

Source§

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

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

impl<'a, V, C> Expr<'a, V> for Excluded<C>
where V: SQLParam + 'a, C: Expr<'a, V> + SQLColumnInfo,

Source§

type SQLType = <C as Expr<'a, V>>::SQLType

The SQL data type this expression evaluates to.
Source§

type Nullable = <C as Expr<'a, V>>::Nullable

Whether this expression can be NULL.
Source§

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>

Render this value as a scalar expression by reference. Read more
Source§

fn into_expr_sql(self) -> SQL<'a, V>
where Self: Sized,

Render this value as a scalar expression, consuming it when useful.
Source§

impl<'a, V, C> ToSQL<'a, V> for Excluded<C>
where V: SQLParam + 'a, C: SQLColumnInfo,

Source§

fn to_sql(&self) -> SQL<'a, V>

Source§

fn into_sql(self) -> SQL<'a, V>
where Self: Sized,

Consume self and return SQL without cloning. Default delegates to to_sql() (which clones). Types that own their SQL (like SQL and SQLExpr) override this to avoid the clone.

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> AliasExt for T

Source§

fn alias(self, name: &'static str) -> AliasedExpr<Self>

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<'a, V, L, R> ComparisonOperand<'a, V, L> for R
where V: SQLParam + 'a, L: Expr<'a, V>, R: Expr<'a, V>, <L as Expr<'a, V>>::SQLType: Compatible<<R as Expr<'a, V>>::SQLType>,

Source§

type SQLType = <R as Expr<'a, V>>::SQLType

Source§

type Aggregate = <R as Expr<'a, V>>::Aggregate

Source§

fn into_comparison_sql(self) -> SQL<'a, V>

Source§

impl<'a, V, E> ExprExt<'a, V> for E
where V: SQLParam, E: Expr<'a, V>,

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>,

Equality comparison (=). Read more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

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 more
Source§

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>,

NOT LIKE pattern matching. Read more
Source§

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>

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>,

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>,

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>
where I: IntoIterator<Item = R>, R: Expr<'a, V>, Self::SQLType: Compatible<R::SQLType>,

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>
where I: IntoIterator<Item = R>, R: Expr<'a, V>, Self::SQLType: Compatible<R::SQLType>,

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>
where S: Expr<'a, V>, Self::SQLType: Compatible<S::SQLType>,

IN subquery check.
Source§

fn not_in_subquery<S>( self, subquery: S, ) -> SQLExpr<'a, V, <V::DialectMarker as DialectTypes>::Bool, NonNull, Self::Aggregate>
where S: Expr<'a, V>, Self::SQLType: Compatible<S::SQLType>,

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>,

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>,

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>

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>

IS FALSE - boolean test that handles NULL. Read more
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<Mk> MarkerAggValidFor<()> for Mk

Source§

impl<Scope> ScopeSatisfies<Nil, ()> for Scope

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 = 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.
Source§

impl<T> TypeEq<T> for T