Struct tokio_sqlite::Connection
source · pub struct Connection { /* private fields */ }
Expand description
An asynchronous SQLite client.
Implementations§
source§impl Connection
impl Connection
sourcepub async fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub async fn open<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Opens a new connection to a SQLite database.
sourcepub async fn transaction(&mut self) -> Result<Transaction<'_>, Error>
pub async fn transaction(&mut self) -> Result<Transaction<'_>, Error>
Begins new transaction.
sourcepub async fn execute<S, A>(
&mut self,
statement: S,
arguments: A
) -> Result<Status, Error>
pub async fn execute<S, A>( &mut self, statement: S, arguments: A ) -> Result<Status, Error>
Executes a statement that does not return the resulting rows.
Returns an error if the query returns resulting rows.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin 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