()
| 354 | /// (see [example use case](https://github.com/SeaQL/sea-orm/discussions/1889)). |
| 355 | #[cfg(feature = "codegen")] |
| 356 | pub 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 | } |
nothing calls this directly
no test coverage detected