pub struct PolymorphicJoinedSelect3<Base: Model, C1: Model, C2: Model, C3: Model> { /* private fields */ }Expand description
A polymorphic SELECT for joined-table inheritance base + three children.
Construct via select!(Base).polymorphic_joined3::<C1, C2, C3>().
Implementations§
Source§impl<Base: Model, C1: Model, C2: Model, C3: Model> PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base: Model, C1: Model, C2: Model, C3: Model> PolymorphicJoinedSelect3<Base, C1, C2, C3>
Sourcepub fn filter(self, expr: Expr) -> Self
pub fn filter(self, expr: Expr) -> Self
Add a WHERE condition (delegates to the underlying base select).
Sourcepub fn order_by(self, order: OrderBy) -> Self
pub fn order_by(self, order: OrderBy) -> Self
Add ORDER BY clause (delegates to the underlying base select).
Sourcepub fn build_with_dialect(&self, dialect: Dialect) -> (String, Vec<Value>)
pub fn build_with_dialect(&self, dialect: Dialect) -> (String, Vec<Value>)
Build the SQL query and parameters.
Sourcepub async fn all<C: Connection>(
self,
cx: &Cx,
conn: &C,
) -> Outcome<Vec<PolymorphicJoined3<Base, C1, C2, C3>>, Error>
pub async fn all<C: Connection>( self, cx: &Cx, conn: &C, ) -> Outcome<Vec<PolymorphicJoined3<Base, C1, C2, C3>>, Error>
Execute the polymorphic query and hydrate either Base or one of the three child types.
Trait Implementations§
Source§impl<Base: Clone + Model, C1: Clone + Model, C2: Clone + Model, C3: Clone + Model> Clone for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base: Clone + Model, C1: Clone + Model, C2: Clone + Model, C3: Clone + Model> Clone for PolymorphicJoinedSelect3<Base, C1, C2, C3>
Source§fn clone(&self) -> PolymorphicJoinedSelect3<Base, C1, C2, C3>
fn clone(&self) -> PolymorphicJoinedSelect3<Base, C1, C2, C3>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<Base, C1, C2, C3> Freeze for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base, C1, C2, C3> RefUnwindSafe for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base, C1, C2, C3> Send for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base, C1, C2, C3> Sync for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base, C1, C2, C3> Unpin for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base, C1, C2, C3> UnsafeUnpin for PolymorphicJoinedSelect3<Base, C1, C2, C3>
impl<Base, C1, C2, C3> UnwindSafe for PolymorphicJoinedSelect3<Base, C1, C2, C3>
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).