pub struct ManagedConnection {
pub db: *mut sqlite3,
}Fields§
§db: *mut sqlite3Trait Implementations§
Source§impl Connection for ManagedConnection
impl Connection for ManagedConnection
Source§fn create_function_v2(
&self,
name: &str,
n_arg: i32,
flags: u32,
user_data: Option<*mut c_void>,
func: Option<xFunc>,
step: Option<xStep>,
final_func: Option<xFinal>,
destroy: Option<xDestroy>,
) -> Result<ResultCode, ResultCode>
fn create_function_v2( &self, name: &str, n_arg: i32, flags: u32, user_data: Option<*mut c_void>, func: Option<xFunc>, step: Option<xStep>, final_func: Option<xFinal>, destroy: Option<xDestroy>, ) -> Result<ResultCode, ResultCode>
TODO: create_function is infrequent enough that we can pay the cost of the copy rather than take a c_char
fn changes64(&self) -> i64
fn commit_hook( &self, callback: Option<xCommitHook>, user_data: *mut c_void, ) -> *mut c_void
fn create_module_v2( &self, name: &str, module: *const module, user_data: Option<*mut c_void>, destroy: Option<xDestroy>, ) -> Result<ResultCode, ResultCode>
fn next_stmt(&self, s: Option<*mut stmt>) -> Option<*mut stmt>
fn prepare_v2(&self, sql: &str) -> Result<ManagedStmt, ResultCode>
fn prepare_v3(&self, sql: &str, flags: u32) -> Result<ManagedStmt, ResultCode>
Source§unsafe fn exec(&self, sql: *const c_char) -> Result<ResultCode, ResultCode>
unsafe fn exec(&self, sql: *const c_char) -> Result<ResultCode, ResultCode>
sql should be a null terminated string! However you find is most efficient to craft those,
hence why we have no opinion on &str vs String vs CString vs whatever
todo: we should make some sort of opaque type to force null termination
this is inehritly unsafe
fn exec_safe(&self, sql: &str) -> Result<ResultCode, ResultCode>
fn errmsg(&self) -> Result<String, IntoStringError>
fn errcode(&self) -> ResultCode
fn error_offset(&self) -> Option<usize>
fn get_autocommit(&self) -> bool
fn rollback_hook( &self, callback: Option<xRollbackHook>, ctx: *mut c_void, ) -> *mut c_void
fn update_hook( &self, callback: Option<xUpdateHook>, ctx: *mut c_void, ) -> *mut c_void
Auto Trait Implementations§
impl Freeze for ManagedConnection
impl RefUnwindSafe for ManagedConnection
impl !Send for ManagedConnection
impl !Sync for ManagedConnection
impl Unpin for ManagedConnection
impl UnsafeUnpin for ManagedConnection
impl UnwindSafe for ManagedConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more