pub struct ReturningQuerySource<StmtKind, T>(/* private fields */);i-implement-a-third-party-backend-and-opt-into-breaking-changes only.Expand description
Synthetic query source used as the QS parameter of
SelectableExpression /
AppearsOnTable when type-checking
RETURNING clauses.
StmtKind is one of the marker structs above; T is the table that the
INSERT/UPDATE/DELETE is acting on.
Trait Implementations§
Source§impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<UpdateStmt, T>
Available on crate feature postgres_backend only.There is an old. for T in ReturningQuerySource<UpdateStmt, T>
impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<UpdateStmt, T>
postgres_backend only.There is an old. for T in ReturningQuerySource<UpdateStmt, T>
Source§impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
Available on crate feature postgres_backend only.There is an old. for T in ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
impl<T> AppearsInFromClause<ReturningQuerySource<OldIdent, T>> for ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
postgres_backend only.There is an old. for T in ReturningQuerySource<InsertStmtWithOnConflictDoUpdate, T>
Source§impl<StmtKind, T1, T2> AppearsInFromClause<T1> for ReturningQuerySource<StmtKind, T2>
impl<StmtKind, T1, T2> AppearsInFromClause<T1> for ReturningQuerySource<StmtKind, T2>
impl<'a, QS, ST, DB, GB, IsAggregate, StmtKind> AppearsOnTable<ReturningQuerySource<StmtKind, QS>> for Box<dyn BoxableExpression<QS, DB, GB, IsAggregate, SqlType = ST> + 'a>
See comment on SelectableExpression impl above.
Source§impl<StmtKind: Clone, T: Clone> Clone for ReturningQuerySource<StmtKind, T>
impl<StmtKind: Clone, T: Clone> Clone for ReturningQuerySource<StmtKind, T>
Source§fn clone(&self) -> ReturningQuerySource<StmtKind, T>
fn clone(&self) -> ReturningQuerySource<StmtKind, T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<StmtKind: Copy, T: Copy> Copy for ReturningQuerySource<StmtKind, T>
Source§impl<StmtKind, T> QuerySource for ReturningQuerySource<StmtKind, T>
impl<StmtKind, T> QuerySource for ReturningQuerySource<StmtKind, T>
Source§type FromClause = <T as QuerySource>::FromClause
type FromClause = <T as QuerySource>::FromClause
from_clauseSource§type DefaultSelection = <T as QuerySource>::DefaultSelection
type DefaultSelection = <T as QuerySource>::DefaultSelection
default_selectionSource§fn from_clause(&self) -> Self::FromClause
fn from_clause(&self) -> Self::FromClause
FROM clause of this type. This is typically only called in
QueryFragment implementations.Source§fn default_selection(&self) -> Self::DefaultSelection
fn default_selection(&self) -> Self::DefaultSelection
starimpl<'a, QS, ST, DB, GB, IsAggregate, StmtKind> SelectableExpression<ReturningQuerySource<StmtKind, QS>> for Box<dyn BoxableExpression<QS, DB, GB, IsAggregate, SqlType = ST> + 'a>
Make Box<dyn BoxableExpression<table>> be SelectableExpression in returning clauses.
This is necessary for backwards-compatibility.
Unfortunately we cannot implement this directly for dyn BoxableExpression
(and rely on our existing generic impls for Box<T>) because the compiler
complains that there is already an automatic implementation of SelectableExpression for
dyn BoxableExpression, even though the QS type is different.
As a workaround, we implement it for Box<dyn BoxableExpression<table>>, which should
cover for most users.
Auto Trait Implementations§
impl<StmtKind, T> Freeze for ReturningQuerySource<StmtKind, T>
impl<StmtKind, T> RefUnwindSafe for ReturningQuerySource<StmtKind, T>where
StmtKind: RefUnwindSafe,
T: RefUnwindSafe,
impl<StmtKind, T> Send for ReturningQuerySource<StmtKind, T>
impl<StmtKind, T> Sync for ReturningQuerySource<StmtKind, T>
impl<StmtKind, T> Unpin for ReturningQuerySource<StmtKind, T>
impl<StmtKind, T> UnsafeUnpin for ReturningQuerySource<StmtKind, T>
impl<StmtKind, T> UnwindSafe for ReturningQuerySource<StmtKind, T>where
StmtKind: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
fn aggregate_distinct(self) -> AggregateDistinct<Self>where
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
fn aggregate_all(self) -> AggregateAll<Self>where
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
fn aggregate_filter<P>(self, f: P) -> AggregateFilter<Self, P>
Source§fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> AggregateOrder<Self, O>where
Self: OrderAggregateDsl<O>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.