pub struct Connection(/* private fields */);Expand description
Database connection
Trait Implementations§
Source§impl Debug for Connection
impl Debug for Connection
Source§impl<'t> Executor<'t> for &'t mut Connection
impl<'t> Executor<'t> for &'t mut Connection
type Database = Sqlite
Source§fn fetch_many<'e, 'q: 'e, E>(
self,
query: E,
) -> BoxStream<'e, Result<Either<SqliteQueryResult, SqliteRow>, Error>>where
E: Execute<'q, Sqlite> + 'q,
't: 'e,
fn fetch_many<'e, 'q: 'e, E>(
self,
query: E,
) -> BoxStream<'e, Result<Either<SqliteQueryResult, SqliteRow>, Error>>where
E: Execute<'q, Sqlite> + 'q,
't: 'e,
Execute multiple queries and return the generated results as a stream
from each query, in a stream.
Source§fn fetch_optional<'e, 'q: 'e, E>(
self,
query: E,
) -> BoxFuture<'e, Result<Option<SqliteRow>, Error>>where
E: Execute<'q, Sqlite> + 'q,
't: 'e,
fn fetch_optional<'e, 'q: 'e, E>(
self,
query: E,
) -> BoxFuture<'e, Result<Option<SqliteRow>, Error>>where
E: Execute<'q, Sqlite> + 'q,
't: 'e,
Execute the query and returns at most one row.
Source§fn prepare_with<'e, 'q: 'e>(
self,
sql: &'q str,
parameters: &'e [SqliteTypeInfo],
) -> BoxFuture<'e, Result<SqliteStatement<'q>, Error>>where
't: 'e,
fn prepare_with<'e, 'q: 'e>(
self,
sql: &'q str,
parameters: &'e [SqliteTypeInfo],
) -> BoxFuture<'e, Result<SqliteStatement<'q>, Error>>where
't: 'e,
Prepare the SQL query, with parameter type information, to inspect the
type information about its parameters and results. Read more
§fn execute<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as Database>::QueryResult, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
fn execute<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as Database>::QueryResult, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
Execute the query and return the total number of rows affected.
§fn execute_many<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Stream<Item = Result<<Self::Database as Database>::QueryResult, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
fn execute_many<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Stream<Item = Result<<Self::Database as Database>::QueryResult, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
Execute multiple queries and return the rows affected from each query, in a stream.
§fn fetch<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Stream<Item = Result<<Self::Database as Database>::Row, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
fn fetch<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Stream<Item = Result<<Self::Database as Database>::Row, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
Execute the query and return the generated results as a stream.
§fn fetch_all<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Future<Output = Result<Vec<<Self::Database as Database>::Row>, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
fn fetch_all<'e, 'q, E>(
self,
query: E,
) -> Pin<Box<dyn Future<Output = Result<Vec<<Self::Database as Database>::Row>, Error>> + Send + 'e>>where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
Execute the query and return all the generated results, collected into a
Vec.Auto Trait Implementations§
impl Freeze for Connection
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more