Returns the query execution details formatted
(
row_count: usize,
maxrows: MaxRows,
query_start_time: Instant,
)
| 86 | |
| 87 | // Returns the query execution details formatted |
| 88 | fn get_execution_details_formatted( |
| 89 | row_count: usize, |
| 90 | maxrows: MaxRows, |
| 91 | query_start_time: Instant, |
| 92 | ) -> String { |
| 93 | let nrows_shown_msg = match maxrows { |
| 94 | MaxRows::Limited(nrows) if nrows < row_count => { |
| 95 | format!("(First {nrows} displayed. Use --maxrows to adjust)") |
| 96 | } |
| 97 | _ => String::new(), |
| 98 | }; |
| 99 | |
| 100 | format!( |
| 101 | "{} row(s) fetched. {}\nElapsed {:.3} seconds.\n", |
| 102 | row_count, |
| 103 | nrows_shown_msg, |
| 104 | query_start_time.elapsed().as_secs_f64() |
| 105 | ) |
| 106 | } |
| 107 | |
| 108 | impl PrintOptions { |
| 109 | /// Print the batches to stdout using the specified format |
no test coverage detected
searching dependent graphs…