Add as_raw to Connection and Statement

This commit is contained in:
Ivan Ukhov 2017-08-23 10:13:59 +02:00
parent 8b3e284771
commit 6c1ddbf184
2 changed files with 12 additions and 0 deletions

View File

@ -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 {

View File

@ -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> {