pub struct SQLiteConnection { /* private fields */ }Implementations§
Source§impl SQLiteConnection
impl SQLiteConnection
pub fn last_error(&self) -> String
Trait Implementations§
Source§impl Connection for SQLiteConnection
impl Connection for SQLiteConnection
Source§async fn connect(url: Cow<'static, str>) -> Result<SQLiteConnection>
async fn connect(url: Cow<'static, str>) -> Result<SQLiteConnection>
Create a connection (or pool) with at least one underlying session
established to the given URL.
Source§impl Executor for SQLiteConnection
impl Executor for SQLiteConnection
Source§type Driver = SQLiteDriver
type Driver = SQLiteDriver
Associated driver.
Source§async fn prepare(&mut self, sql: String) -> Result<Query<Self::Driver>>
async fn prepare(&mut self, sql: String) -> Result<Query<Self::Driver>>
Prepare a query for later execution.
Source§fn run<'s>(
&'s mut self,
query: impl AsQuery<Self::Driver> + 's,
) -> impl Stream<Item = Result<QueryResult>> + Send
fn run<'s>( &'s mut self, query: impl AsQuery<Self::Driver> + 's, ) -> impl Stream<Item = Result<QueryResult>> + Send
Run a query, streaming
QueryResult items.Source§fn accepts_multiple_statements(&self) -> bool
fn accepts_multiple_statements(&self) -> bool
Returns true if the executor accepts multiple SQL statements in a single
request (e.g.
CREATE; INSERT; SELECT). Defaults to true.Source§fn fetch<'s>(
&'s mut self,
query: impl AsQuery<Self::Driver> + 's,
) -> impl Stream<Item = Result<RowLabeled, Error>> + Send
fn fetch<'s>( &'s mut self, query: impl AsQuery<Self::Driver> + 's, ) -> impl Stream<Item = Result<RowLabeled, Error>> + Send
Stream only labeled rows (filters non-row results).
Source§fn execute<'s>(
&'s mut self,
query: impl AsQuery<Self::Driver> + 's,
) -> impl Future<Output = Result<RowsAffected, Error>> + Send
fn execute<'s>( &'s mut self, query: impl AsQuery<Self::Driver> + 's, ) -> impl Future<Output = Result<RowsAffected, Error>> + Send
Execute and aggregate affected rows.
Auto Trait Implementations§
impl Freeze for SQLiteConnection
impl RefUnwindSafe for SQLiteConnection
impl Send for SQLiteConnection
impl Sync for SQLiteConnection
impl Unpin for SQLiteConnection
impl UnwindSafe for SQLiteConnection
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