Struct Selector
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§
§impl<S> Selector<S>where
S: SelectorTrait,
impl<S> Selector<S>where
S: SelectorTrait,
pub fn into_statement(self, builder: DbBackend) -> Statement
pub fn into_statement(self, builder: DbBackend) -> Statement
Get the SQL statement
pub async fn one<C>(self, db: &C) -> Result<Option<S::Item>, DbErr>where
C: ConnectionTrait,
pub async fn one<C>(self, db: &C) -> Result<Option<S::Item>, DbErr>where
C: ConnectionTrait,
Get an item from the Select query
Trait Implementations§
§impl<S> Clone for Selector<S>where
S: SelectorTrait + Clone,
impl<S> Clone for Selector<S>where
S: SelectorTrait + Clone,
§impl<S> Debug for Selector<S>where
S: SelectorTrait + Debug,
impl<S> Debug for Selector<S>where
S: SelectorTrait + Debug,
§impl<'db, C, S> PaginatorTrait<'db, C> for Selector<S>
impl<'db, C, S> PaginatorTrait<'db, C> for Selector<S>
§impl<S> SelectExt for Selector<S>where
S: SelectorTrait,
impl<S> SelectExt for Selector<S>where
S: SelectorTrait,
Auto Trait Implementations§
impl<S> Freeze for Selector<S>
impl<S> RefUnwindSafe for Selector<S>where
S: RefUnwindSafe,
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>where
S: UnwindSafe,
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: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more