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

Function all_about_select

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

Source from the content-addressed store, hash-verified

2use sea_orm::{entity::*, error::*, query::*, DbConn, FromQueryResult};
3
4pub async fn all_about_select(db: &DbConn) -> Result<(), DbErr> {
5 find_all(db).await?;
6
7 println!("===== =====\n");
8
9 find_one(db).await?;
10
11 println!("===== =====\n");
12
13 find_one_to_one(db).await?;
14
15 println!("===== =====\n");
16
17 find_one_to_many(db).await?;
18
19 println!("===== =====\n");
20
21 count_fruits_by_cake(db).await?;
22
23 println!("===== =====\n");
24
25 find_many_to_many(db).await?;
26
27 if false {
28 println!("===== =====\n");
29
30 all_about_select_json(db).await?;
31 }
32
33 println!("===== =====\n");
34
35 find_all_stream(db).await.unwrap();
36
37 println!("===== =====\n");
38
39 find_first_page(db).await.unwrap();
40
41 println!("===== =====\n");
42
43 find_num_pages(db).await.unwrap();
44
45 Ok(())
46}
47
48async fn find_all(db: &DbConn) -> Result<(), DbErr> {
49 print!("find all cakes: ");

Callers 1

mainFunction · 0.85

Calls 11

find_allFunction · 0.85
find_oneFunction · 0.85
find_one_to_oneFunction · 0.85
find_one_to_manyFunction · 0.85
count_fruits_by_cakeFunction · 0.85
find_many_to_manyFunction · 0.85
all_about_select_jsonFunction · 0.85
find_all_streamFunction · 0.85
find_first_pageFunction · 0.85
find_num_pagesFunction · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected