(&self, stmt: Statement)
| 187 | /// Get the results of a query returning them as a Vec<[QueryResult]> |
| 188 | #[instrument(level = "trace")] |
| 189 | pub async fn query_all(&self, stmt: Statement) -> Result<Vec<QueryResult>, DbErr> { |
| 190 | debug_print!("{}", stmt); |
| 191 | |
| 192 | let query = sqlx_query(&stmt); |
| 193 | let mut conn = self.pool.acquire().await.map_err(sqlx_conn_acquire_err)?; |
| 194 | crate::metric::metric!(self.metric_callback, &stmt, { |
| 195 | match query.fetch_all(&mut *conn).await { |
| 196 | Ok(rows) => Ok(rows.into_iter().map(|r| r.into()).collect()), |
| 197 | Err(err) => Err(sqlx_error_to_query_err(err)), |
| 198 | } |
| 199 | }) |
| 200 | } |
| 201 | |
| 202 | /// Stream the results of executing a SQL query |
| 203 | #[instrument(level = "trace")] |
nothing calls this directly
no test coverage detected