Adds a method get the underlying sqlite3 pointer
@@ -4,6 +4,7 @@ use std::sync::Arc;
use futures_core::future::BoxFuture;
use futures_util::future;
use hashbrown::HashMap;
+use libsqlite3_sys::sqlite3;
use crate::connection::{Connect, Connection};
use crate::error::Error;
@@ -33,6 +34,13 @@ pub struct SqliteConnection {
scratch_row_column_names: Arc<HashMap<UStr, usize>>,
}
+impl SqliteConnection {
+ /// Returns the underlying sqlite3* connection handle
+ pub fn as_raw_handle(&self) -> *mut sqlite3 {
+ self.handle.as_ptr()
+ }
+}
+
impl Debug for SqliteConnection {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
f.debug_struct("SqliteConnection").finish()
