Skip to content

Commit

Permalink
Merge pull request #3744 from Elrendio/FIX-MissingTypeAliasOrderByFor…
Browse files Browse the repository at this point in the history
…AutoType

Fix missing type alias order by for auto type
  • Loading branch information
weiznich authored Aug 14, 2023
2 parents c37bd05 + e88f31e commit c99ebda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions diesel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ pub mod helper_types {
/// Represents the return type of [`.order(ordering)`](crate::prelude::QueryDsl::order)
pub type Order<Source, Ordering> = <Source as OrderDsl<Ordering>>::Output;

/// Represents the return type of [`.order_by(ordering)`](crate::prelude::QueryDsl::order_by)
///
/// Type alias of [Order]
pub type OrderBy<Source, Ordering> = Order<Source, Ordering>;

/// Represents the return type of [`.then_order_by(ordering)`](crate::prelude::QueryDsl::then_order_by)
pub type ThenOrderBy<Source, Ordering> = <Source as ThenOrderDsl<Ordering>>::Output;

Expand Down
2 changes: 1 addition & 1 deletion diesel/src/query_dsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ pub trait QueryDsl: Sized {
}

/// Alias for `order`
fn order_by<Expr>(self, expr: Expr) -> Order<Self, Expr>
fn order_by<Expr>(self, expr: Expr) -> OrderBy<Self, Expr>
where
Expr: Expression,
Self: methods::OrderDsl<Expr>,
Expand Down

0 comments on commit c99ebda

Please sign in to comment.