diff --git a/src/connection.rs b/src/connection.rs index 8c18e2c..a56e908 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -131,6 +131,12 @@ impl Connection { } Ok(()) } + + /// Return the raw pointer. + #[inline] + pub fn as_raw(&self) -> *mut ffi::sqlite3 { + self.raw + } } impl Drop for Connection { diff --git a/src/statement.rs b/src/statement.rs index 7fef4a6..4fed850 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -101,6 +101,12 @@ impl<'l> Statement<'l> { pub fn cursor(self) -> Cursor<'l> { ::cursor::new(self) } + + /// Return the raw pointer. + #[inline] + pub fn as_raw(&self) -> *mut ffi::sqlite3_stmt { + self.raw.0 + } } impl<'l> Drop for Statement<'l> {