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

Function main

sea-orm-cli/src/cli.rs:356–382  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

354/// (see [example use case](https://github.com/SeaQL/sea-orm/discussions/1889)).
355#[cfg(feature = "codegen")]
356pub async fn main() {
357 dotenv().ok();
358
359 let cli = Cli::parse();
360 let verbose = cli.verbose;
361
362 match cli.command {
363 Commands::Generate { command } => {
364 run_generate_command(command, verbose)
365 .await
366 .unwrap_or_else(handle_error);
367 }
368 Commands::Migrate {
369 migration_dir,
370 database_schema,
371 database_url,
372 command,
373 } => run_migrate_command(
374 command,
375 &migration_dir,
376 database_schema,
377 database_url,
378 verbose,
379 )
380 .unwrap_or_else(handle_error),
381 }
382}

Callers

nothing calls this directly

Calls 2

run_generate_commandFunction · 0.85
run_migrate_commandFunction · 0.85

Tested by

no test coverage detected