pub enum QueryOrderDirection {
Ascending,
Descending,
}Expand description
The direction of the query ordering.
Implements Display
assert_eq!(&QueryOrderDirection::Ascending.to_string(), "ASC");
assert_eq!(&QueryOrderDirection::Descending.to_string(), "DESC");Variants§
Implementations§
Source§impl QueryOrderDirection
impl QueryOrderDirection
Sourcepub fn order_query<Expr, Q>(
&self,
query: Q,
expr: Expr,
) -> OrderWithDirection<Q, Expr>
pub fn order_query<Expr, Q>( &self, query: Q, expr: Expr, ) -> OrderWithDirection<Q, Expr>
Append a QueryDsl::order to the query. Same as
query.order_with_dir(self, expr)
pub fn order_multiple<Expr, Q>(
&self,
query: Q,
expr: Expr,
) -> OrderMultipleWithDirection<Q, Expr>where
Expr: OrderableTuple,
Q: OrderDsl<<Expr as OrderableTuple>::AscOutput> + OrderDsl<<Expr as OrderableTuple>::DescOutput, Output = <Q as OrderDsl<<Expr as OrderableTuple>::AscOutput>>::Output>,
Sourcepub fn then_order_by_query<Expr, Q>(
&self,
query: Q,
expr: Expr,
) -> ThenOrderByWithDirection<Q, Expr>where
Expr: ExpressionMethods,
Q: ThenOrderDsl<Asc<Expr>> + ThenOrderDsl<Desc<Expr>, Output = <Q as ThenOrderDsl<Asc<Expr>>>::Output>,
pub fn then_order_by_query<Expr, Q>(
&self,
query: Q,
expr: Expr,
) -> ThenOrderByWithDirection<Q, Expr>where
Expr: ExpressionMethods,
Q: ThenOrderDsl<Asc<Expr>> + ThenOrderDsl<Desc<Expr>, Output = <Q as ThenOrderDsl<Asc<Expr>>>::Output>,
Append a QueryDsl::then_order_by to the query. Same as
query.then_order_by_with_dir(self, expr)
Trait Implementations§
Source§impl Clone for QueryOrderDirection
impl Clone for QueryOrderDirection
Source§fn clone(&self) -> QueryOrderDirection
fn clone(&self) -> QueryOrderDirection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QueryOrderDirection
impl Debug for QueryOrderDirection
Source§impl Default for QueryOrderDirection
impl Default for QueryOrderDirection
Source§impl Display for QueryOrderDirection
impl Display for QueryOrderDirection
Source§impl Hash for QueryOrderDirection
impl Hash for QueryOrderDirection
Source§impl Ord for QueryOrderDirection
impl Ord for QueryOrderDirection
Source§fn cmp(&self, other: &QueryOrderDirection) -> Ordering
fn cmp(&self, other: &QueryOrderDirection) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for QueryOrderDirection
impl PartialEq for QueryOrderDirection
Source§impl PartialOrd for QueryOrderDirection
impl PartialOrd for QueryOrderDirection
impl Copy for QueryOrderDirection
impl Eq for QueryOrderDirection
impl StructuralPartialEq for QueryOrderDirection
Auto Trait Implementations§
impl Freeze for QueryOrderDirection
impl RefUnwindSafe for QueryOrderDirection
impl Send for QueryOrderDirection
impl Sync for QueryOrderDirection
impl Unpin for QueryOrderDirection
impl UnwindSafe for QueryOrderDirection
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Add an aggregate function filter Read more
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Add an aggregate function order Read more
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read moreSource§impl<Q> OrderWithDirectionDsl for Q
impl<Q> OrderWithDirectionDsl for Q
Source§fn order_with_dir<Expr>(
self,
direction: QueryOrderDirection,
expr: Expr,
) -> OrderWithDirection<Self, Expr>
fn order_with_dir<Expr>( self, direction: QueryOrderDirection, expr: Expr, ) -> OrderWithDirection<Self, Expr>
Wrapper around
QueryDsl::order with an extra QueryOrderDirection argument to
dynamically determine the ordering direction. Only works with boxed queries.Source§fn order_by_with_dir<Expr>(
self,
order: QueryOrderDirection,
expr: Expr,
) -> OrderWithDirection<Self, Expr>
fn order_by_with_dir<Expr>( self, order: QueryOrderDirection, expr: Expr, ) -> OrderWithDirection<Self, Expr>
Alias for
DynamicQueryOrderDsl::order_with_dirSource§fn order_multiple_with_dir<Expr>(
self,
direction: QueryOrderDirection,
expr: Expr,
) -> OrderMultipleWithDirection<Self, Expr>where
Expr: OrderableTuple,
Self: OrderDsl<<Expr as OrderableTuple>::AscOutput> + OrderDsl<<Expr as OrderableTuple>::DescOutput, Output = <Self as OrderDsl<<Expr as OrderableTuple>::AscOutput>>::Output>,
fn order_multiple_with_dir<Expr>(
self,
direction: QueryOrderDirection,
expr: Expr,
) -> OrderMultipleWithDirection<Self, Expr>where
Expr: OrderableTuple,
Self: OrderDsl<<Expr as OrderableTuple>::AscOutput> + OrderDsl<<Expr as OrderableTuple>::DescOutput, Output = <Self as OrderDsl<<Expr as OrderableTuple>::AscOutput>>::Output>,
Wrapper around
QueryDsl::order when its expr is a tuple. The direction argument determines the ordering direction of all fields in the tuple Read moreSource§fn then_order_by_with_dir<Expr>(
self,
direction: QueryOrderDirection,
expr: Expr,
) -> ThenOrderByWithDirection<Self, Expr>where
Expr: ExpressionMethods,
Self: ThenOrderDsl<Asc<Expr>> + ThenOrderDsl<Desc<Expr>, Output = <Self as ThenOrderDsl<Asc<Expr>>>::Output>,
fn then_order_by_with_dir<Expr>(
self,
direction: QueryOrderDirection,
expr: Expr,
) -> ThenOrderByWithDirection<Self, Expr>where
Expr: ExpressionMethods,
Self: ThenOrderDsl<Asc<Expr>> + ThenOrderDsl<Desc<Expr>, Output = <Self as ThenOrderDsl<Asc<Expr>>>::Output>,
Wrapper around
QueryDsl::then_order_by with an extra QueryOrderDirection argument to
dynamically determine the ordering direction. Only works with boxed queries.Source§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> Self::Output
fn window_filter<P>(self, f: P) -> Self::Output
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more