Skip to main content

Derived

Struct Derived 

Source
pub struct Derived<'a, V: SQLParam, Name, Projection, Query> { /* private fields */ }
Expand description

A complete query used as a named source in another query.

Implementations§

Source§

impl<'a, V, Name, Projection, Query> Derived<'a, V, Name, Projection, Query>
where V: SQLParam, Name: Tag, Projection: DerivedProjection<Name>,

Source

pub const fn query(&self) -> &Query

Returns the underlying query.

Source

pub fn into_query(self) -> Query

Returns the underlying query by value.

Source

pub fn fields(&self) -> Projection::Fields
where Name: Tag, Projection: DerivedProjection<Name>,

Returns typed fields qualified by this source’s name.

Trait Implementations§

Source§

impl<'a, V: SQLParam, Name, Projection, Query: Clone> Clone for Derived<'a, V, Name, Projection, Query>

Source§

fn clone(&self) -> Self

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<'a, V, Name, Output, Projection, Query> ColumnOf<Derived<'a, V, Name, Projection, Query>> for DerivedField<Name, Output>
where V: SQLParam,

Source§

impl<'a, V, Name, Projection, Query> HasSelectModel for Derived<'a, V, Name, Projection, Query>
where V: SQLParam, Name: Tag, Projection: DerivedProjection<Name>,

Source§

const COLUMN_COUNT: usize = Projection::COLUMN_COUNT

Source§

type SelectModel = <Projection as DerivedProjection<Name>>::Row

Source§

impl<'a, V, Name, Projection, Query> ToSQL<'a, V> for Derived<'a, V, Name, Projection, Query>
where V: SQLParam, Name: Tag, Query: ToSQL<'a, V>,

Source§

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

Source§

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

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<'a, V, Name, Projection, Query> Freeze for Derived<'a, V, Name, Projection, Query>
where Query: Freeze, PhantomData<(&'a (), V, Name, Projection)>: Freeze,

§

impl<'a, V, Name, Projection, Query> RefUnwindSafe for Derived<'a, V, Name, Projection, Query>
where Query: RefUnwindSafe, PhantomData<(&'a (), V, Name, Projection)>: RefUnwindSafe,

§

impl<'a, V, Name, Projection, Query> Send for Derived<'a, V, Name, Projection, Query>
where Query: Send, PhantomData<(&'a (), V, Name, Projection)>: Send,

§

impl<'a, V, Name, Projection, Query> Sync for Derived<'a, V, Name, Projection, Query>
where Query: Sync, PhantomData<(&'a (), V, Name, Projection)>: Sync,

§

impl<'a, V, Name, Projection, Query> Unpin for Derived<'a, V, Name, Projection, Query>
where Query: Unpin, PhantomData<(&'a (), V, Name, Projection)>: Unpin,

§

impl<'a, V, Name, Projection, Query> UnsafeUnpin for Derived<'a, V, Name, Projection, Query>
where Query: UnsafeUnpin, PhantomData<(&'a (), V, Name, Projection)>: UnsafeUnpin,

§

impl<'a, V, Name, Projection, Query> UnwindSafe for Derived<'a, V, Name, Projection, Query>
where Query: UnwindSafe, PhantomData<(&'a (), V, Name, Projection)>: 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<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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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