File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,13 @@ use super::{ffi, Result};
1111use crate :: arrow2;
1212use crate :: { error:: result_from_duckdb_arrow, Error } ;
1313
14- // Private newtype for raw sqlite3_stmts that finalize themselves when dropped.
15- // TODO: destroy statement and result
14+ /// Private newtype for DuckDB prepared statements that finalize themselves when dropped.
15+ ///
16+ /// # Thread Safety
17+ ///
18+ /// `RawStatement` is `Send` but not `Sync`:
19+ /// - `Send` because it owns all its data and can be safely moved between threads
20+ /// - Not `Sync` because DuckDB prepared statements don't support concurrent access
1621#[ derive( Debug ) ]
1722pub struct RawStatement {
1823 ptr : ffi:: duckdb_prepared_statement ,
@@ -325,3 +330,5 @@ impl Drop for RawStatement {
325330 }
326331 }
327332}
333+
334+ unsafe impl Send for RawStatement { }
You can’t perform that action at this time.
0 commit comments