mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-06 09:48:58 +08:00
Add Statement::parameter_name
This commit is contained in:
committed by
Thom Chiovoloni
parent
9ea5e2fc04
commit
b8b1138fcf
@@ -144,6 +144,18 @@ impl RawStatement {
|
||||
})
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn bind_parameter_name(&self, index: i32) -> Option<&CStr> {
|
||||
unsafe {
|
||||
let name = ffi::sqlite3_bind_parameter_name(self.ptr, index);
|
||||
if name.is_null() {
|
||||
None
|
||||
} else {
|
||||
Some(CStr::from_ptr(name))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn clear_bindings(&self) -> c_int {
|
||||
unsafe { ffi::sqlite3_clear_bindings(self.ptr) }
|
||||
|
||||
Reference in New Issue
Block a user