(&self)
| 246 | impl TransactionTrait for DatabaseConnection { |
| 247 | #[instrument(level = "trace")] |
| 248 | async fn begin(&self) -> Result<DatabaseTransaction, DbErr> { |
| 249 | match self { |
| 250 | #[cfg(feature = "sqlx-mysql")] |
| 251 | DatabaseConnection::SqlxMySqlPoolConnection(conn) => conn.begin(None, None).await, |
| 252 | #[cfg(feature = "sqlx-postgres")] |
| 253 | DatabaseConnection::SqlxPostgresPoolConnection(conn) => conn.begin(None, None).await, |
| 254 | #[cfg(feature = "sqlx-sqlite")] |
| 255 | DatabaseConnection::SqlxSqlitePoolConnection(conn) => conn.begin(None, None).await, |
| 256 | #[cfg(feature = "mock")] |
| 257 | DatabaseConnection::MockDatabaseConnection(conn) => { |
| 258 | DatabaseTransaction::new_mock(Arc::clone(conn), None).await |
| 259 | } |
| 260 | #[cfg(feature = "proxy")] |
| 261 | DatabaseConnection::ProxyDatabaseConnection(conn) => { |
| 262 | DatabaseTransaction::new_proxy(conn.clone(), None).await |
| 263 | } |
| 264 | DatabaseConnection::Disconnected => Err(conn_err("Disconnected")), |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | #[instrument(level = "trace")] |
| 269 | async fn begin_with_config( |
no test coverage detected