pub fn render_table<T: Query>(items: Vec<T>)Expand description
Renders a table to stdout for any type that implements the Query trait.
Examples found in repository?
examples/db_settings.rs (line 13)
4async fn main() -> Result<(), PgExtrasError> {
5 std::env::set_var(
6 "PG_EXTRAS_DATABASE_URL",
7 "postgres://postgres:secret@localhost:5432/pg-extras-rs-test",
8 );
9
10 let pool = pg_pool().await?;
11
12 let settings = db_settings(&pool).await?;
13 render_table(settings);
14
15 Ok(())
16}