pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
pub async fn query(&self, sql: &str, params: impl IntoParams) -> Result<Rows>
pub async fn execute(&self, sql: &str, params: impl IntoParams) -> Result<u64>
pub async fn prepare(&self, sql: &str) -> Result<Statement>
Sourcepub fn changes(&self) -> Result<i64>
pub fn changes(&self) -> Result<i64>
Return the number of rows changed by the most recent DML statement on
this connection. Mirrors sqlite3_changes() semantics: DDL statements
and BEGIN/COMMIT/ROLLBACK return 0.
pub fn pragma_query<F>(&self, pragma_name: &str, f: F) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Connection
impl RefUnwindSafe for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
impl UnwindSafe 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