pub struct NativeDatabaseHandle { /* private fields */ }Implementations§
Source§impl NativeDatabaseHandle
impl NativeDatabaseHandle
pub fn new(vfs: NativeVfsHandle, file_name: String) -> Result<Self>
pub fn new_with_metrics( vfs: NativeVfsHandle, file_name: String, metrics: Option<Arc<dyn SqliteVfsMetrics>>, ) -> Result<Self>
pub async fn exec(&self, sql: String) -> Result<QueryResult>
pub async fn exec_profiled( &self, sql: String, ) -> Result<SqliteWorkerResult<QueryResult>>
pub async fn query( &self, sql: String, params: Option<Vec<BindParam>>, ) -> Result<QueryResult>
pub async fn run( &self, sql: String, params: Option<Vec<BindParam>>, ) -> Result<ExecResult>
pub async fn execute( &self, sql: String, params: Option<Vec<BindParam>>, ) -> Result<ExecuteResult>
pub async fn execute_profiled( &self, sql: String, params: Option<Vec<BindParam>>, ) -> Result<SqliteWorkerResult<ExecuteResult>>
pub async fn close(&self) -> Result<()>
Sourcepub async fn close_and_wait(&self) -> Result<()>
pub async fn close_and_wait(&self) -> Result<()>
Closes the database without returning while its worker still owns SQLite. Any returned error is reported only after the worker thread has terminated.
pub async fn wait_for_worker_failure(&self) -> bool
pub fn take_last_kv_error(&self) -> Option<String>
pub fn clone_fatal_error(&self) -> Option<String>
pub fn snapshot_preload_hints(&self) -> VfsPreloadHintSnapshot
Sourcepub fn read_vfs_file(&self, path: &str) -> Option<Vec<u8>>
pub fn read_vfs_file(&self, path: &str) -> Option<Vec<u8>>
Reads back a file the connection wrote through its own VFS, such as a VACUUM INTO output.
Sourcepub fn delete_vfs_file(&self, path: &str)
pub fn delete_vfs_file(&self, path: &str)
Drops a file the connection wrote through its own VFS, releasing the memory holding it.
pub fn sqlite_vfs_metrics(&self) -> SqliteVfsMetricsSnapshot
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NativeDatabaseHandle
impl !UnwindSafe for NativeDatabaseHandle
impl Freeze for NativeDatabaseHandle
impl Send for NativeDatabaseHandle
impl Sync for NativeDatabaseHandle
impl Unpin for NativeDatabaseHandle
impl UnsafeUnpin for NativeDatabaseHandle
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