(command: &Option<Command>, config: &Config, cli: &Cli)
| 16 | } |
| 17 | |
| 18 | pub(crate) async fn handle(command: &Option<Command>, config: &Config, cli: &Cli) { |
| 19 | match command { |
| 20 | Some(Command::Size) => connect(config, cli) |
| 21 | .await |
| 22 | .get_database_size() |
| 23 | .await |
| 24 | .map(|size| json!({"size": size})) |
| 25 | .print_result(cli), |
| 26 | |
| 27 | Some(Command::Shrink) => connect(config, cli) |
| 28 | .await |
| 29 | .shrink_database() |
| 30 | .await |
| 31 | .print_result(cli), |
| 32 | |
| 33 | None => {} |
| 34 | } |
| 35 | } |
nothing calls this directly
no test coverage detected