From bab013ddd126b400bea192cfd15b6ae72ea35082 Mon Sep 17 00:00:00 2001 From: frectonz Date: Thu, 17 Oct 2024 14:46:38 +0300 Subject: [PATCH] fix: error in fetching column names from duckdb --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ae10d5d..14dda9b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2621,7 +2621,8 @@ mod duckdb { let mut tables = Vec::with_capacity(table_names.len()); for table_name in table_names { let sql = format!(r#"SELECT * FROM "{table_name}" WHERE false"#); - let stmt = c.prepare(&sql)?; + let mut stmt = c.prepare(&sql)?; + let _ = stmt.query_map([], |_| Ok(()))?; let columns = stmt.column_names(); tables.push(responses::TableWithColumns {