kubo/rust-oracle

Request for implementing Sync/Send trait for Row and ResultSet

Opened this issue · 2 comments

So we can access the rows of the result set of call like conn.query_named in an async function.
Then call this async function with tokio spawn.
Thanks.

My temporary workaround. FYI:

Add the following lines into src/row.rs:

unsafe impl Sync for Row {}
unsafe impl Send for Row {}

unsafe impl<'a, T> Sync for ResultSet<'a, T> where T: RowValue {}
unsafe impl<'a, T> Send for ResultSet<'a, T> where T: RowValue {}