(&self, stmt: Statement)
| 174 | /// Get the results of a query returning them as a Vec<[QueryResult]> |
| 175 | #[instrument(level = "trace")] |
| 176 | pub async fn query_all(&self, stmt: Statement) -> Result<Vec<QueryResult>, DbErr> { |
| 177 | debug_print!("{}", stmt); |
| 178 | |
| 179 | let query = sqlx_query(&stmt); |
| 180 | let mut conn = self.pool.acquire().await.map_err(sqlx_conn_acquire_err)?; |
| 181 | crate::metric::metric!(self.metric_callback, &stmt, { |
| 182 | match query.fetch_all(&mut *conn).await { |
| 183 | Ok(rows) => Ok(rows.into_iter().map(|r| r.into()).collect()), |
| 184 | Err(err) => Err(sqlx_error_to_query_err(err)), |
| 185 | } |
| 186 | }) |
| 187 | } |
| 188 | |
| 189 | /// Stream the results of executing a SQL query |
| 190 | #[instrument(level = "trace")] |
nothing calls this directly
no test coverage detected