pub struct SelectQuery<T: Table, O = ()> { /* private fields */ }Implementations§
Source§impl<T: Table, O> SelectQuery<T, O>
impl<T: Table, O> SelectQuery<T, O>
pub fn select<S: Selection>(self, selection: S) -> SelectQuery<T, S::Output>
Sourcepub fn select_all(self) -> SelectQuery<T, ()>
pub fn select_all(self) -> SelectQuery<T, ()>
Select every column for driver-owned row access.
The output is intentionally untyped because a table marker does not
define a Rust record decoder. Use an explicit selection with
fetch_all_as when typed decoding is required.
pub fn distinct(self) -> Self
pub fn with<C: Table>(self, cte: Cte<C>) -> Self
pub fn as_cte<C: Table>(self) -> Cte<C>
pub fn filter(self, expression: Expression) -> Self
pub fn group_by<TableType, ValueType>( self, column: Column<TableType, ValueType>, ) -> Self
pub fn having(self, expression: Expression) -> Self
pub fn inner_join<J: Table>(self, on: Expression) -> Self
pub fn left_join<J: Table>(self, on: Expression) -> Self
pub fn right_join<J: Table>(self, on: Expression) -> Self
pub fn full_join<J: Table>(self, on: Expression) -> Self
pub fn inner_join_as<Source: Table, Alias: Table>(self, on: Expression) -> Self
pub fn left_join_as<Source: Table, Alias: Table>(self, on: Expression) -> Self
pub fn order_by<TableType, ValueType>( self, column: Column<TableType, ValueType>, direction: OrderDirection, ) -> Self
pub fn order_by_expression<ValueType>( self, expression: TypedExpression<ValueType>, direction: OrderDirection, ) -> Self
pub fn limit(self, limit: u64) -> Self
pub fn offset(self, offset: u64) -> Self
Sourcepub fn for_update(self) -> Self
pub fn for_update(self) -> Self
Lock every selected row with PostgreSQL FOR UPDATE.
Sourcepub fn for_update_of<Locked: Table>(self) -> Self
pub fn for_update_of<Locked: Table>(self) -> Self
Lock only the named source or join marker with PostgreSQL
FOR UPDATE OF.
Sourcepub fn for_no_key_update(self) -> Self
pub fn for_no_key_update(self) -> Self
Lock every selected row with PostgreSQL FOR NO KEY UPDATE.
Sourcepub fn for_no_key_update_of<Locked: Table>(self) -> Self
pub fn for_no_key_update_of<Locked: Table>(self) -> Self
Lock only the named source or join marker with PostgreSQL
FOR NO KEY UPDATE OF.
Lock every selected row with PostgreSQL FOR SHARE.
Lock only the named source or join marker with PostgreSQL FOR SHARE OF.
Lock every selected row with PostgreSQL FOR KEY SHARE.
Lock only the named source or join marker with PostgreSQL
FOR KEY SHARE OF.
Sourcepub fn skip_locked(self) -> Self
pub fn skip_locked(self) -> Self
Skip rows currently held by a conflicting row lock.
pub fn union<Source: Table>(self, query: SelectQuery<Source, O>) -> Self
pub fn union_all<Source: Table>(self, query: SelectQuery<Source, O>) -> Self
pub fn intersect<Source: Table>(self, query: SelectQuery<Source, O>) -> Self
pub fn except<Source: Table>(self, query: SelectQuery<Source, O>) -> Self
Trait Implementations§
Source§impl<T: Clone + Table, O: Clone> Clone for SelectQuery<T, O>
impl<T: Clone + Table, O: Clone> Clone for SelectQuery<T, O>
Source§fn clone(&self) -> SelectQuery<T, O>
fn clone(&self) -> SelectQuery<T, O>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more