mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
fix: implement AnyConnectionBackend::as_migrate for databases
This commit is contained in:
parent
a942f5316e
commit
9677430d67
3 changed files with 21 additions and 0 deletions
|
@ -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…
Reference in a new issue