pub struct Selector<S> where
S: SelectorTrait, { /* private fields */ }
Expand description
Defines a type to do SELECT
operations through a SelectStatement on a Model
Implementations
sourceimpl<S> Selector<S> where
S: SelectorTrait,
impl<S> Selector<S> where
S: SelectorTrait,
sourcepub fn with_columns<T, C>(
query: SelectStatement
) -> Selector<SelectGetableValue<T, C>> where
T: TryGetableMany,
C: IntoEnumIterator + Iden,
pub fn with_columns<T, C>(
query: SelectStatement
) -> Selector<SelectGetableValue<T, C>> where
T: TryGetableMany,
C: IntoEnumIterator + Iden,
Create Selector
from Statment and columns. Executing this Selector
will return a type T
which implement TryGetableMany
.
sourcepub async fn one<'a, C>(self, db: &C) -> Result<Option<S::Item>, DbErr> where
C: ConnectionTrait,
pub async fn one<'a, C>(self, db: &C) -> Result<Option<S::Item>, DbErr> where
C: ConnectionTrait,
Get an item from the Select query
Trait Implementations
sourceimpl<S: Clone> Clone for Selector<S> where
S: SelectorTrait,
impl<S: Clone> Clone for Selector<S> where
S: SelectorTrait,
sourceimpl<S: Debug> Debug for Selector<S> where
S: SelectorTrait,
impl<S: Debug> Debug for Selector<S> where
S: SelectorTrait,
sourceimpl<'db, C, S> PaginatorTrait<'db, C> for Selector<S> where
C: ConnectionTrait,
S: SelectorTrait + Send + Sync + 'db,
impl<'db, C, S> PaginatorTrait<'db, C> for Selector<S> where
C: ConnectionTrait,
S: SelectorTrait + Send + Sync + 'db,
Auto Trait Implementations
impl<S> !RefUnwindSafe for Selector<S>
impl<S> Send for Selector<S> where
S: Send,
impl<S> Sync for Selector<S> where
S: Sync,
impl<S> Unpin for Selector<S> where
S: Unpin,
impl<S> !UnwindSafe for Selector<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more