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

Method query_all

src/driver/sqlx_mysql.rs:158–169  ·  view source on GitHub ↗
(&self, stmt: Statement)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sqlx_queryFunction · 0.70

Tested by

no test coverage detected