MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / query_all

Method query_all

src/driver/sqlx_postgres.rs:189–200  ·  view source on GitHub ↗
(&self, stmt: Statement)

Source from the content-addressed store, hash-verified

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")]

Callers

nothing calls this directly

Calls 1

sqlx_queryFunction · 0.70

Tested by

no test coverage detected