Format query results in the specified format
(result: &QueryResult, format: crate::cli::commands::OutputFormat)
| 13 | impl ResultFormatter { |
| 14 | /// Format query results in the specified format |
| 15 | pub fn format(result: &QueryResult, format: crate::cli::commands::OutputFormat) -> String { |
| 16 | match format { |
| 17 | crate::cli::commands::OutputFormat::Table => Self::format_table(result), |
| 18 | crate::cli::commands::OutputFormat::Json => Self::format_json(result), |
| 19 | crate::cli::commands::OutputFormat::Csv => Self::format_csv(result), |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | /// Format results as a table using comfy-table |
| 24 | fn format_table(result: &QueryResult) -> String { |
no outgoing calls
no test coverage detected