(&self, stmt: Statement)
| 156 | /// Get the results of a query returning them as a Vec<[QueryResult]> |
| 157 | #[instrument(level = "trace")] |
| 158 | pub async fn query_all(&self, stmt: Statement) -> Result<Vec<QueryResult>, DbErr> { |
| 159 | debug_print!("{}", stmt); |
| 160 | |
| 161 | let query = sqlx_query(&stmt); |
| 162 | let mut conn = self.pool.acquire().await.map_err(sqlx_conn_acquire_err)?; |
| 163 | crate::metric::metric!(self.metric_callback, &stmt, { |
| 164 | match query.fetch_all(&mut *conn).await { |
| 165 | Ok(rows) => Ok(rows.into_iter().map(|r| r.into()).collect()), |
| 166 | Err(err) => Err(sqlx_error_to_query_err(err)), |
| 167 | } |
| 168 | }) |
| 169 | } |
| 170 | |
| 171 | /// Stream the results of executing a SQL query |
| 172 | #[instrument(level = "trace")] |
nothing calls this directly
no test coverage detected