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

Method run

examples/react_admin/backend/src/tasks/seed.rs:33–44  ·  view source on GitHub ↗
(&self, app_context: &AppContext, vars: &task::Vars)

Source from the content-addressed store, hash-verified

31 }
32
33 async fn run(&self, app_context: &AppContext, vars: &task::Vars) -> Result<()> {
34 let refresh = vars
35 .cli_arg("refresh")
36 .is_ok_and(|refresh| refresh == "true");
37
38 if refresh {
39 db::reset::<Migrator>(&app_context.db).await?;
40 }
41 let path = std::path::Path::new("src/fixtures");
42 db::run_app_seed::<App>(app_context, path).await?;
43 Ok(())
44 }
45}

Callers

nothing calls this directly

Calls 1

newFunction · 0.50

Tested by

no test coverage detected