(
&'a self,
stmt: Statement,
)
| 217 | #[instrument(level = "trace")] |
| 218 | #[allow(unused_variables)] |
| 219 | fn stream<'a>( |
| 220 | &'a self, |
| 221 | stmt: Statement, |
| 222 | ) -> Pin<Box<dyn Future<Output = Result<Self::Stream<'a>, DbErr>> + 'a + Send>> { |
| 223 | Box::pin(async move { |
| 224 | match self { |
| 225 | #[cfg(feature = "sqlx-mysql")] |
| 226 | DatabaseConnection::SqlxMySqlPoolConnection(conn) => conn.stream(stmt).await, |
| 227 | #[cfg(feature = "sqlx-postgres")] |
| 228 | DatabaseConnection::SqlxPostgresPoolConnection(conn) => conn.stream(stmt).await, |
| 229 | #[cfg(feature = "sqlx-sqlite")] |
| 230 | DatabaseConnection::SqlxSqlitePoolConnection(conn) => conn.stream(stmt).await, |
| 231 | #[cfg(feature = "mock")] |
| 232 | DatabaseConnection::MockDatabaseConnection(conn) => { |
| 233 | Ok(crate::QueryStream::from((Arc::clone(conn), stmt, None))) |
| 234 | } |
| 235 | #[cfg(feature = "proxy")] |
| 236 | DatabaseConnection::ProxyDatabaseConnection(conn) => { |
| 237 | Ok(crate::QueryStream::from((Arc::clone(conn), stmt, None))) |
| 238 | } |
| 239 | DatabaseConnection::Disconnected => Err(conn_err("Disconnected")), |
| 240 | } |
| 241 | }) |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | #[async_trait::async_trait] |
nothing calls this directly
no test coverage detected