Partial fix following John suggestions.

This commit is contained in:
Gwenael Treguier
2015-12-15 21:49:59 +01:00
parent 108b6b6fcd
commit 880a78ae83
2 changed files with 36 additions and 8 deletions

View File

@@ -929,7 +929,15 @@ impl<'conn> Statement<'conn> {
}
}
fn sql(&self) -> String { // TODO Maybe SQL should by kept as an SqliteStatement field ?
#[cfg(feature = "cache")]
fn clear_bindings(&mut self) {
unsafe {
ffi::sqlite3_clear_bindings(self.stmt);
};
}
#[cfg(feature = "cache")]
fn sql(&self) -> String {
unsafe {
let c_slice = CStr::from_ptr(ffi::sqlite3_sql(self.stmt)).to_bytes();
let utf8_str = str::from_utf8(c_slice);