| 105 | #[async_trait::async_trait] |
| 106 | impl ConnectionTrait for DatabaseConnection { |
| 107 | fn get_database_backend(&self) -> DbBackend { |
| 108 | match self { |
| 109 | #[cfg(feature = "sqlx-mysql")] |
| 110 | DatabaseConnection::SqlxMySqlPoolConnection(_) => DbBackend::MySql, |
| 111 | #[cfg(feature = "sqlx-postgres")] |
| 112 | DatabaseConnection::SqlxPostgresPoolConnection(_) => DbBackend::Postgres, |
| 113 | #[cfg(feature = "sqlx-sqlite")] |
| 114 | DatabaseConnection::SqlxSqlitePoolConnection(_) => DbBackend::Sqlite, |
| 115 | #[cfg(feature = "mock")] |
| 116 | DatabaseConnection::MockDatabaseConnection(conn) => conn.get_database_backend(), |
| 117 | #[cfg(feature = "proxy")] |
| 118 | DatabaseConnection::ProxyDatabaseConnection(conn) => conn.get_database_backend(), |
| 119 | DatabaseConnection::Disconnected => panic!("Disconnected"), |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | #[instrument(level = "trace")] |
| 124 | #[allow(unused_variables)] |