MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / order_by_asc

Method order_by_asc

src/query/helper.rs:624–631  ·  view source on GitHub ↗

Add an order_by expression (ascending) ``` use sea_orm::{entity::*, query::*, tests_cfg::cake, DbBackend}; assert_eq!( cake::Entity::find() .order_by_asc(cake::Column::Id) .build(DbBackend::MySql) .to_string(), "SELECT `cake`.`id`, `cake`.`name` FROM `cake` ORDER BY `cake`.`id` ASC" ); ```

(mut self, col: C)

Source from the content-addressed store, hash-verified

622 /// );
623 /// ```
624 fn order_by_asc<C>(mut self, col: C) -> Self
625 where
626 C: IntoSimpleExpr,
627 {
628 self.query()
629 .order_by_expr(col.into_simple_expr(), Order::Asc);
630 self
631 }
632
633 /// Add an order_by expression (descending)
634 /// ```

Callers 15

partial_model_join_threeFunction · 0.80
exists_with_orderingFunction · 0.80
relatedFunction · 0.80
linkedFunction · 0.80
select_threeFunction · 0.80

Implementers 1

cursor.rssrc/executor/cursor.rs

Calls 2

into_simple_exprMethod · 0.80
queryMethod · 0.45

Tested by 12

partial_model_join_threeFunction · 0.64
exists_with_orderingFunction · 0.64
relatedFunction · 0.64
linkedFunction · 0.64
select_threeFunction · 0.64