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

Method query_all

src/driver/sqlx_sqlite.rs:176–187  ·  view source on GitHub ↗
(&self, stmt: Statement)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sqlx_queryFunction · 0.70

Tested by

no test coverage detected