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

Function main

issues/1278/src/main.rs:18–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17#[tokio::main]
18async fn main() {
19 let db = Database::connect("xxxx").await.unwrap();
20
21 let result1 = entity::Entity::find()
22 .select_only()
23 .column(entity::Column::Name)
24 .into_model::<PoolResult>()
25 .all(&db)
26 .await
27 .unwrap();
28
29 let result2: Vec<String> = entity::Entity::find()
30 .select_only()
31 .column_as(entity::Column::Name, QueryAs::PoolName)
32 .into_values::<_, QueryAs>()
33 .all(&db)
34 .await
35 .unwrap();
36}

Callers

nothing calls this directly

Calls 5

unwrapMethod · 0.80
columnMethod · 0.80
select_onlyMethod · 0.80
column_asMethod · 0.80
allMethod · 0.45

Tested by

no test coverage detected