mirror of
https://github.com/isar/rusqlite.git
synced 2025-11-06 09:48:58 +08:00
Implement our own sqlite3_exec
Should fix issue related to unlock notify: #767 Caveat: many CString allocated.
This commit is contained in:
@@ -12,7 +12,7 @@ use std::sync::Arc;
|
||||
#[derive(Debug)]
|
||||
pub struct RawStatement {
|
||||
ptr: *mut ffi::sqlite3_stmt,
|
||||
tail: bool,
|
||||
tail: usize,
|
||||
// Cached indices of named parameters, computed on the fly.
|
||||
cache: crate::util::ParamIndexCache,
|
||||
// Cached SQL (trimmed) that we use as the key when we're in the statement
|
||||
@@ -29,7 +29,7 @@ pub struct RawStatement {
|
||||
}
|
||||
|
||||
impl RawStatement {
|
||||
pub unsafe fn new(stmt: *mut ffi::sqlite3_stmt, tail: bool) -> RawStatement {
|
||||
pub unsafe fn new(stmt: *mut ffi::sqlite3_stmt, tail: usize) -> RawStatement {
|
||||
RawStatement {
|
||||
ptr: stmt,
|
||||
tail,
|
||||
@@ -170,6 +170,10 @@ impl RawStatement {
|
||||
|
||||
#[cfg(feature = "extra_check")]
|
||||
pub fn has_tail(&self) -> bool {
|
||||
self.tail != 0
|
||||
}
|
||||
|
||||
pub fn tail(&self) -> usize {
|
||||
self.tail
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user