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

Function find_all

examples/basic/src/select.rs:48–68  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

46}
47
48async fn find_all(db: &DbConn) -> Result<(), DbErr> {
49 print!("find all cakes: ");
50
51 let cakes: Vec<cake::Model> = Cake::find().all(db).await?;
52
53 println!();
54 for cc in cakes.iter() {
55 println!("{cc:?}\n");
56 }
57
58 print!("find all fruits: ");
59
60 let fruits = Fruit::find().all(db).await?;
61
62 println!();
63 for ff in fruits.iter() {
64 println!("{ff:?}\n");
65 }
66
67 Ok(())
68}
69
70async fn find_one_to_one(db: &DbConn) -> Result<(), DbErr> {
71 print!("find fruits and cakes: ");

Callers 1

all_about_selectFunction · 0.85

Calls 1

allMethod · 0.45

Tested by

no test coverage detected