[−][src]Struct sqlx::sqlite::SqliteConnection
This is supported on crate feature
sqlite
only.A connection to a Sqlite database.
Implementations
impl SqliteConnection
[src]
pub fn as_raw_handle(&mut self) -> *mut sqlite3
[src]
Returns the underlying sqlite3* connection handle
pub fn create_collation(
&mut self,
name: &str,
compare: impl Send + Sync + Fn(&str, &str) -> Ordering + 'static
) -> Result<(), Error>
[src]
&mut self,
name: &str,
compare: impl Send + Sync + Fn(&str, &str) -> Ordering + 'static
) -> Result<(), Error>
Trait Implementations
impl<'c> Acquire<'c> for &'c mut SqliteConnection
[src]
type Database = Sqlite
type Connection = &'c mut <Sqlite as Database>::Connection
pub fn acquire(
self
) -> Pin<Box<dyn Future<Output = Result<<&'c mut SqliteConnection as Acquire<'c>>::Connection, Error>> + 'c + Send, Global>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<<&'c mut SqliteConnection as Acquire<'c>>::Connection, Error>> + 'c + Send, Global>>
pub fn begin(
self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'c, Sqlite>, Error>> + 'c + Send, Global>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'c, Sqlite>, Error>> + 'c + Send, Global>>
impl Connection for SqliteConnection
[src]
type Database = Sqlite
type Options = SqliteConnectOptions
pub fn close(
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send, Global>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send, Global>>
pub fn ping(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send, Global>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send, Global>>
pub fn begin(
&mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, <SqliteConnection as Connection>::Database>, Error>> + Send, Global>> where
SqliteConnection: Sized,
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, <SqliteConnection as Connection>::Database>, Error>> + Send, Global>> where
SqliteConnection: Sized,
pub fn cached_statements_size(&self) -> usize
[src]
pub fn clear_cached_statements(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send, Global>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send, Global>>
fn transaction<'c, 'f, T, E, F, Fut>(
&'c mut self,
f: F
) -> Pin<Box<dyn Future<Output = Result<T, E>> + 'f + Send, Global>> where
'c: 'f,
E: From<Error> + Send,
F: FnOnce(&mut <Self::Database as Database>::Connection) -> Fut + Send + 'f,
Fut: Future<Output = Result<T, E>> + Send,
T: Send,
[src]
&'c mut self,
f: F
) -> Pin<Box<dyn Future<Output = Result<T, E>> + 'f + Send, Global>> where
'c: 'f,
E: From<Error> + Send,
F: FnOnce(&mut <Self::Database as Database>::Connection) -> Fut + Send + 'f,
Fut: Future<Output = Result<T, E>> + Send,
T: Send,
fn connect(
url: &str
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'static + Send, Global>>
[src]
url: &str
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'static + Send, Global>>
fn connect_with(
options: &Self::Options
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send, Global>>
[src]
options: &Self::Options
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send, Global>>
impl Debug for SqliteConnection
[src]
impl Drop for SqliteConnection
[src]
impl<'c> Executor<'c> for &'c mut SqliteConnection
[src]
type Database = Sqlite
pub fn fetch_many<'e, 'q, E>(
self,
query: E
) -> Pin<Box<dyn Stream<Item = Result<Either<SqliteDone, SqliteRow>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut SqliteConnection as Executor<'c>>::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Stream<Item = Result<Either<SqliteDone, SqliteRow>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut SqliteConnection as Executor<'c>>::Database>,
pub fn fetch_optional<'e, 'q, E>(
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<Option<SqliteRow>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut SqliteConnection as Executor<'c>>::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<Option<SqliteRow>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut SqliteConnection as Executor<'c>>::Database>,
pub fn prepare_with<'e, 'q>(
self,
sql: &'q str,
_parameters: &[SqliteTypeInfo]
) -> Pin<Box<dyn Future<Output = Result<SqliteStatement<'q>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
[src]
self,
sql: &'q str,
_parameters: &[SqliteTypeInfo]
) -> Pin<Box<dyn Future<Output = Result<SqliteStatement<'q>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
fn execute<'e, 'q, E>(
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as Database>::Done, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as Database>::Done, Error>> + 'e + Send, Global>> 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>::Done, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Stream<Item = Result<<Self::Database as Database>::Done, Error>> + 'e + Send, Global>> 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>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Stream<Item = Result<<Self::Database as Database>::Row, Error>> + 'e + Send, Global>> 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>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<Vec<<Self::Database as Database>::Row>, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
fn fetch_one<'e, 'q, E>(
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as Database>::Row, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as Database>::Row, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, Self::Database>,
fn prepare<'e, 'q>(
self,
query: &'q str
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as HasStatement<'q>>::Statement, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
[src]
self,
query: &'q str
) -> Pin<Box<dyn Future<Output = Result<<Self::Database as HasStatement<'q>>::Statement, Error>> + 'e + Send, Global>> where
'q: 'e,
'c: 'e,
impl Migrate for SqliteConnection
[src]
pub fn ensure_migrations_table(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send, Global>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send, Global>>
pub fn version(
&mut self
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, MigrateError>> + Send, Global>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, MigrateError>> + Send, Global>>
pub fn lock(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send, Global>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send, Global>>
pub fn unlock(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send, Global>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send, Global>>
pub fn validate<'e, 'm>(
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + 'm + Send, Global>> where
'e: 'm,
[src]
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + 'm + Send, Global>> where
'e: 'm,
pub fn apply<'e, 'm>(
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + 'm + Send, Global>> where
'e: 'm,
[src]
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + 'm + Send, Global>> where
'e: 'm,
Auto Trait Implementations
impl RefUnwindSafe for SqliteConnection
impl Send for SqliteConnection
impl !Sync for SqliteConnection
impl Unpin for SqliteConnection
impl UnwindSafe for SqliteConnection
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,