Expand description
Query result table renderable for beautiful result display.
Provides a table specifically designed for displaying query results with rich formatting in styled mode and multiple plain text formats for agent compatibility.
§Example
use sqlmodel_console::renderables::{QueryResultTable, PlainFormat};
let table = QueryResultTable::new()
.title("Query Results")
.columns(vec!["id", "name", "email"])
.row(vec!["1", "Alice", "alice@example.com"])
.row(vec!["2", "Bob", "bob@example.com"])
.timing_ms(12.34)
.max_width(80);
// Plain mode output (pipe-delimited)
println!("{}", table.render_plain());
// Or use a different format
println!("{}", table.render_plain_format(PlainFormat::Csv));Structs§
- Cell
- A cell in the query result table.
- Query
Result Table - A table for displaying query results.
Enums§
- Plain
Format - Plain text output format for query results.
- Value
Type - SQL value type for cell coloring.
Type Aliases§
- Query
Results - Alias for
QueryResultTablefor simpler API.