pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
Sourcepub fn trace_stmt(&mut self, f: TraceFn)
pub fn trace_stmt(&mut self, f: TraceFn)
Install the engine’s per-statement trace (sqlite3_trace_v2, SQLITE_TRACE_STMT): f
sees every statement this connection executes, with bound parameters expanded.
Sourcepub fn open_memory() -> Result<Connection, SqlError>
pub fn open_memory() -> Result<Connection, SqlError>
A private in-memory database, the only kind the main-thread app instance may open.
Sourcepub fn open_opfs(name: &str) -> Result<Connection, SqlError>
pub fn open_opfs(name: &str) -> Result<Connection, SqlError>
A named database through the day-opfs VFS (real OPFS in the worker, the in-memory fake in native tests).
Sourcepub fn execute_batch(&self, sql: &str) -> Result<(), SqlError>
pub fn execute_batch(&self, sql: &str) -> Result<(), SqlError>
Run semicolon-separated statements with no parameters and no rows.
Sourcepub fn execute(&self, sql: &str, params: &[Value]) -> Result<u64, SqlError>
pub fn execute(&self, sql: &str, params: &[Value]) -> Result<u64, SqlError>
Run one statement; the count of changed rows comes back.
Trait Implementations§
Source§impl Drop for Connection
impl Drop for Connection
Auto Trait Implementations§
impl !RefUnwindSafe for Connection
impl !Send for Connection
impl !Sync for Connection
impl !UnwindSafe for Connection
impl Forget for Connection
impl Freeze for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
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