Skip to content

Commit 4a0d813

Browse files
diegoimbertMaxxen
authored andcommitted
use duckdb_prepared_statement_column_logical_type instead
1 parent 7c76284 commit 4a0d813

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crates/duckdb/src/raw_statement.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,10 @@ impl RawStatement {
217217

218218
#[inline]
219219
pub fn column_logical_type(&self, idx: usize) -> LogicalTypeHandle {
220-
let ptr = unsafe { ffi::duckdb_column_logical_type(&mut self.duckdb_result.unwrap() as *mut _, idx as u64) };
221-
LogicalTypeHandle { ptr }
220+
unsafe {
221+
let ptr = ffi::duckdb_prepared_statement_column_logical_type(self.ptr, idx as u64);
222+
LogicalTypeHandle::new(ptr)
223+
}
222224
}
223225

224226
#[inline]

0 commit comments

Comments
 (0)