Add binding to sqlite3_expanded_sql

This commit is contained in:
gwenn
2018-08-10 20:52:11 +02:00
parent 31de0187a2
commit 4c3fa7bd53
2 changed files with 29 additions and 0 deletions

View File

@@ -88,6 +88,18 @@ impl RawStatement {
pub fn readonly(&self) -> bool {
unsafe { ffi::sqlite3_stmt_readonly(self.0) != 0 }
}
#[cfg(feature = "bundled")]
pub fn expanded_sql(&self) -> Option<&CStr> {
unsafe {
let ptr = ffi::sqlite3_expanded_sql(self.0);
if ptr.is_null() {
None
} else {
Some(CStr::from_ptr(ptr))
}
}
}
}
impl Drop for RawStatement {