diesel/query_builder/
order_clause.rs
1simple_clause!(NoOrderClause, OrderClause, " ORDER BY ");
2
3impl<'a, DB, Expr> From<OrderClause<Expr>> for Option<Box<dyn QueryFragment<DB> + Send + 'a>>
4where
5 DB: Backend,
6 Expr: QueryFragment<DB> + Send + 'a,
7{
8 fn from(order: OrderClause<Expr>) -> Self {
9 Some(Box::new(order.0))
10 }
11}
12
13impl<DB> From<NoOrderClause> for Option<Box<dyn QueryFragment<DB> + Send + '_>>
14where
15 DB: Backend,
16{
17 fn from(_: NoOrderClause) -> Self {
18 None
19 }
20}