[−][src]Struct sqlx::AnyConnection
A connection to any SQLx database.
The database driver used is determined by the scheme of the connection url.
postgres://postgres@localhost/test
sqlite://a.sqlite
Trait Implementations
impl<'c> Acquire<'c> for &'c mut AnyConnection
[src]
type Database = Any
type Connection = &'c mut <Any as Database>::Connection
fn acquire(
self
) -> Pin<Box<dyn Future<Output = Result<<&'c mut AnyConnection as Acquire<'c>>::Connection, Error>> + 'c + Send>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<<&'c mut AnyConnection as Acquire<'c>>::Connection, Error>> + 'c + Send>>
fn begin(
self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'c, Any>, Error>> + 'c + Send>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'c, Any>, Error>> + 'c + Send>>
impl Connection for AnyConnection
[src]
type Database = Any
type Options = AnyConnectOptions
fn close(
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send>>
fn ping(&mut self) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>
[src]
fn begin(
&mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, <AnyConnection as Connection>::Database>, Error>> + Send>> where
AnyConnection: Sized,
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<Transaction<'_, <AnyConnection as Connection>::Database>, Error>> + Send>> where
AnyConnection: Sized,
fn cached_statements_size(&self) -> usize
[src]
fn clear_cached_statements(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>
fn transaction<'c, 'f, T, E, F, Fut>(
&'c mut self,
f: F
) -> Pin<Box<dyn Future<Output = Result<T, E>> + 'f + Send>> 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>> 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>>
[src]
url: &str
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'static + Send>>
fn connect_with(
options: &Self::Options
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send>>
[src]
options: &Self::Options
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send>>
impl Debug for AnyConnection
[src]
impl<'c> Executor<'c> for &'c mut AnyConnection
[src]
type Database = Any
fn fetch_many<'e, 'q, E>(
self,
query: E
) -> Pin<Box<dyn Stream<Item = Result<Either<AnyDone, AnyRow>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut AnyConnection as Executor<'c>>::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Stream<Item = Result<Either<AnyDone, AnyRow>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut AnyConnection as Executor<'c>>::Database>,
fn fetch_optional<'e, 'q, E>(
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<Option<AnyRow>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut AnyConnection as Executor<'c>>::Database>,
[src]
self,
query: E
) -> Pin<Box<dyn Future<Output = Result<Option<AnyRow>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
E: 'q + Execute<'q, <&'c mut AnyConnection as Executor<'c>>::Database>,
fn prepare_with<'e, 'q>(
self,
sql: &'q str,
_parameters: &[AnyTypeInfo]
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'q>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
[src]
self,
sql: &'q str,
_parameters: &[AnyTypeInfo]
) -> Pin<Box<dyn Future<Output = Result<AnyStatement<'q>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
fn describe<'e, 'q>(
self,
sql: &'q str
) -> Pin<Box<dyn Future<Output = Result<Describe<<&'c mut AnyConnection as Executor<'c>>::Database>, Error>> + 'e + Send>> where
'q: 'e,
'c: 'e,
[src]
self,
sql: &'q str
) -> Pin<Box<dyn Future<Output = Result<Describe<<&'c mut AnyConnection as Executor<'c>>::Database>, Error>> + 'e + Send>> 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>> 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>> 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>> 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>> 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>> 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>> 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>> 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>> 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>> 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>> 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>> 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>> where
'q: 'e,
'c: 'e,
impl Migrate for AnyConnection
[src]
fn ensure_migrations_table(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send>>
fn version(
&mut self
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, MigrateError>> + Send>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<Option<(i64, bool)>, MigrateError>> + Send>>
fn lock(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send>>
fn unlock(
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send>>
[src]
&mut self
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + Send>>
fn validate<'e, 'm>(
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + 'm + Send>> where
'e: 'm,
[src]
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<(), MigrateError>> + 'm + Send>> where
'e: 'm,
fn apply<'e, 'm>(
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + 'm + Send>> where
'e: 'm,
[src]
&'e mut self,
migration: &'m Migration
) -> Pin<Box<dyn Future<Output = Result<Duration, MigrateError>> + 'm + Send>> where
'e: 'm,
Auto Trait Implementations
impl !RefUnwindSafe for AnyConnection
impl Send for AnyConnection
impl !Sync for AnyConnection
impl Unpin for AnyConnection
impl !UnwindSafe for AnyConnection
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,
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.
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.
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>,