Add support for querying sqlite_stmt_status

This commit is contained in:
Thom Chiovoloni
2019-01-24 21:43:39 -08:00
parent 6d1c915c2b
commit ec879337af
3 changed files with 44 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
use super::ffi;
use super::unlock_notify;
use super::StatementStatus;
use std::ffi::CStr;
use std::os::raw::c_int;
use std::ptr;
@@ -100,6 +101,11 @@ impl RawStatement {
}
}
}
pub fn get_status(&self, status: StatementStatus, reset: bool) -> i32 {
assert!(!self.0.is_null());
unsafe { ffi::sqlite3_stmt_status(self.0, status as i32, reset as i32) }
}
}
impl Drop for RawStatement {