File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ impl Statement<'_> {
49
49
/// If associated DB schema can be altered concurrently, you should make
50
50
/// sure that current statement has already been stepped once before
51
51
/// calling this method.
52
+ ///
53
+ /// # Caveats
54
+ /// Panics if the query has not been [`execute`](Statement::execute)d yet.
52
55
#[ inline]
53
56
pub fn column_count ( & self ) -> usize {
54
57
self . stmt . column_count ( )
Original file line number Diff line number Diff line change @@ -198,6 +198,8 @@ impl RawStatement {
198
198
}
199
199
}
200
200
201
+ // FIXME(mlafeldt): This currently panics if the query has not been executed yet.
202
+ // The C API doesn't have a function to get the column count without executing the query first.
201
203
#[ inline]
202
204
pub fn column_count ( & self ) -> usize {
203
205
unsafe { ffi:: duckdb_arrow_column_count ( self . result_unwrap ( ) ) as usize }
You can’t perform that action at this time.
0 commit comments