mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-02-14 20:07:31 +00:00
fix: implement AnyConnectionBackend::as_migrate for databases
This commit is contained in:
parent
a942f5316e
commit
9677430d67
@ -62,6 +62,13 @@ impl AnyConnectionBackend for MySqlConnection {
|
||||
Connection::should_flush(self)
|
||||
}
|
||||
|
||||
#[cfg(feature = "migrate")]
|
||||
fn as_migrate(
|
||||
&mut self,
|
||||
) -> sqlx_core::Result<&mut (dyn sqlx_core::migrate::Migrate + Send + 'static)> {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
fn fetch_many<'q>(
|
||||
&'q mut self,
|
||||
query: &'q str,
|
||||
|
||||
@ -65,6 +65,13 @@ impl AnyConnectionBackend for PgConnection {
|
||||
Connection::should_flush(self)
|
||||
}
|
||||
|
||||
#[cfg(feature = "migrate")]
|
||||
fn as_migrate(
|
||||
&mut self,
|
||||
) -> sqlx_core::Result<&mut (dyn sqlx_core::migrate::Migrate + Send + 'static)> {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
fn fetch_many<'q>(
|
||||
&'q mut self,
|
||||
query: &'q str,
|
||||
|
||||
@ -67,6 +67,13 @@ impl AnyConnectionBackend for SqliteConnection {
|
||||
Connection::should_flush(self)
|
||||
}
|
||||
|
||||
#[cfg(feature = "migrate")]
|
||||
fn as_migrate(
|
||||
&mut self,
|
||||
) -> sqlx_core::Result<&mut (dyn sqlx_core::migrate::Migrate + Send + 'static)> {
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
fn fetch_many<'q>(
|
||||
&'q mut self,
|
||||
query: &'q str,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user