pub struct PolymorphicJoinedSelect2<Base, C1, C2>{ /* private fields */ }Expand description
A polymorphic SELECT for joined-table inheritance base + two children.
Construct via select!(Base).polymorphic_joined2::<C1, C2>().
Implementations§
Source§impl<Base, C1, C2> PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> PolymorphicJoinedSelect2<Base, C1, C2>
Sourcepub fn filter(self, expr: Expr) -> PolymorphicJoinedSelect2<Base, C1, C2>
pub fn filter(self, expr: Expr) -> PolymorphicJoinedSelect2<Base, C1, C2>
Add a WHERE condition (delegates to the underlying base select).
Sourcepub fn order_by(self, order: OrderBy) -> PolymorphicJoinedSelect2<Base, C1, C2>
pub fn order_by(self, order: OrderBy) -> PolymorphicJoinedSelect2<Base, C1, C2>
Add ORDER BY clause (delegates to the underlying base select).
Sourcepub fn limit(self, n: u64) -> PolymorphicJoinedSelect2<Base, C1, C2>
pub fn limit(self, n: u64) -> PolymorphicJoinedSelect2<Base, C1, C2>
Set LIMIT (delegates to the underlying base select).
Sourcepub fn offset(self, n: u64) -> PolymorphicJoinedSelect2<Base, C1, C2>
pub fn offset(self, n: u64) -> PolymorphicJoinedSelect2<Base, C1, C2>
Set OFFSET (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>(
self,
cx: &Cx,
conn: &C,
) -> Outcome<Vec<PolymorphicJoined2<Base, C1, C2>>, Error>where
C: Connection,
pub async fn all<C>(
self,
cx: &Cx,
conn: &C,
) -> Outcome<Vec<PolymorphicJoined2<Base, C1, C2>>, Error>where
C: Connection,
Execute the polymorphic query and hydrate either Base or C1 or C2 per row.
Trait Implementations§
Source§impl<Base, C1, C2> Clone for PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> Clone for PolymorphicJoinedSelect2<Base, C1, C2>
Source§fn clone(&self) -> PolymorphicJoinedSelect2<Base, C1, C2>
fn clone(&self) -> PolymorphicJoinedSelect2<Base, C1, C2>
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> Freeze for PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> RefUnwindSafe for PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> Send for PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> Sync for PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> Unpin for PolymorphicJoinedSelect2<Base, C1, C2>
impl<Base, C1, C2> UnwindSafe for PolymorphicJoinedSelect2<Base, C1, C2>
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).