pub struct Select<Out, Loads = NoLoad, Lock = NoRowLock, DistinctState = NotDistinct, GroupState = NotGrouped> { /* private fields */ }Implementations§
Source§impl<Out> Select<Out, NoLoad, NoRowLock, NotDistinct, NotGrouped>
impl<Out> Select<Out, NoLoad, NoRowLock, NotDistinct, NotGrouped>
Source§impl<Out, Loads, Lock, DistinctState, GroupState> Select<Out, Loads, Lock, DistinctState, GroupState>
impl<Out, Loads, Lock, DistinctState, GroupState> Select<Out, Loads, Lock, DistinctState, GroupState>
pub fn table(&self) -> Table
pub fn columns_ref(&self) -> Option<&[SelectItem]>
pub fn joins(&self) -> &[Join]
pub fn select_only(self) -> Self
pub fn column<T>(self, expr: impl IntoExpr<T>) -> Self
pub fn column_as<T>(self, expr: impl IntoExpr<T>, alias: &str) -> Self
pub fn filter(self, expr: Expr<bool>) -> Self
pub fn join<R>(self, rel: R) -> Selfwhere
R: RelationInfo<Parent = Out>,
pub fn left_join<R>(self, rel: R) -> Selfwhere
R: RelationInfo<Parent = Out>,
pub fn join_on(self, table: Table, on: Expr<bool>) -> Self
pub fn left_join_on(self, table: Table, on: Expr<bool>) -> Self
pub fn limit(self, limit: u64) -> Self
pub fn offset(self, offset: u64) -> Self
pub fn order_by(self, order: Order) -> Self
pub fn columns(self, columns: Vec<ColumnRef>) -> Self
pub fn into_model<T>(self) -> Select<T, Loads, Lock, DistinctState, GroupState>
pub fn with<L>(
self,
load: L,
) -> Select<L::Out2, LoadChain<Loads, L>, Lock, DistinctState, GroupState>where
L: ApplyLoad<Out>,
pub fn compile(&self) -> CompiledSql
pub fn compile_without_pagination(&self) -> CompiledSql
pub fn compile_with_extra( &self, extra_columns: &[SelectItem], extra_joins: &[Join], ) -> CompiledSql
pub fn debug_sql(&self) -> String
pub fn into_parts(self) -> (CompiledSql, Loads)
pub fn into_parts_with_loads( self, ) -> (Select<Out, NoLoad, Lock, DistinctState, GroupState>, Loads)
Source§impl<Out, Loads, DistinctState, GroupState> Select<Out, Loads, NoRowLock, DistinctState, GroupState>
impl<Out, Loads, DistinctState, GroupState> Select<Out, Loads, NoRowLock, DistinctState, GroupState>
Source§impl<Out, Loads, GroupState> Select<Out, Loads, NoRowLock, NotDistinct, GroupState>
impl<Out, Loads, GroupState> Select<Out, Loads, NoRowLock, NotDistinct, GroupState>
pub fn distinct( self, ) -> Select<Out, Loads, NoRowLock, DistinctSelected, GroupState>
Source§impl<Out, Loads> Select<Out, Loads, NoRowLock, NotDistinct, NotGrouped>
impl<Out, Loads> Select<Out, Loads, NoRowLock, NotDistinct, NotGrouped>
pub fn for_update( self, ) -> Select<Out, Loads, ForUpdateRowLock, NotDistinct, NotGrouped>
Source§impl<Out, Loads, GroupState> Select<Out, Loads, NoRowLock, DistinctSelected, GroupState>
impl<Out, Loads, GroupState> Select<Out, Loads, NoRowLock, DistinctSelected, GroupState>
Source§impl<Out, Loads> Select<Out, Loads, ForUpdateRowLock, NotDistinct, NotGrouped>
impl<Out, Loads> Select<Out, Loads, ForUpdateRowLock, NotDistinct, NotGrouped>
pub fn for_update(self) -> Self
pub fn skip_locked(self) -> Self
pub fn nowait(self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<Out, Loads, Lock, DistinctState, GroupState> Freeze for Select<Out, Loads, Lock, DistinctState, GroupState>where
Loads: Freeze,
impl<Out, Loads, Lock, DistinctState, GroupState> RefUnwindSafe for Select<Out, Loads, Lock, DistinctState, GroupState>where
Loads: RefUnwindSafe,
Out: RefUnwindSafe,
Lock: RefUnwindSafe,
DistinctState: RefUnwindSafe,
GroupState: RefUnwindSafe,
impl<Out, Loads, Lock, DistinctState, GroupState> Send for Select<Out, Loads, Lock, DistinctState, GroupState>
impl<Out, Loads, Lock, DistinctState, GroupState> Sync for Select<Out, Loads, Lock, DistinctState, GroupState>
impl<Out, Loads, Lock, DistinctState, GroupState> Unpin for Select<Out, Loads, Lock, DistinctState, GroupState>
impl<Out, Loads, Lock, DistinctState, GroupState> UnsafeUnpin for Select<Out, Loads, Lock, DistinctState, GroupState>where
Loads: UnsafeUnpin,
impl<Out, Loads, Lock, DistinctState, GroupState> UnwindSafe for Select<Out, Loads, Lock, DistinctState, GroupState>where
Loads: UnwindSafe,
Out: UnwindSafe,
Lock: UnwindSafe,
DistinctState: UnwindSafe,
GroupState: 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