You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Statement::column_count() just returns a usize, yet it can easily fail. In that case it panics because it calls result_unwrap() as shown by this backtrace.
4: duckdb::raw_statement::RawStatement::result_unwrap
at .../.cargo/registry/src/index.crates.io-6f17d22bba15001f/duckdb-0.9.2/src/raw_statement.rs:72:9
5: duckdb::raw_statement::RawStatement::column_count
at .../.cargo/registry/src/index.crates.io-6f17d22bba15001f/duckdb-0.9.2/src/raw_statement.rs:168:49
6: duckdb::column::<impl duckdb::statement::Statement>::column_count
at .../.cargo/registry/src/index.crates.io-6f17d22bba15001f/duckdb-0.9.2/src/column.rs:49:9
All I did was this:
let mut stmt = conn.prepare(&sql)?;
let cols = stmt.column_count();
There's no indication that that will panic!
The text was updated successfully, but these errors were encountered:
Statement::column_count()
just returns ausize
, yet it can easily fail. In that case it panics because it callsresult_unwrap()
as shown by this backtrace.All I did was this:
There's no indication that that will panic!
The text was updated successfully, but these errors were encountered: