mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-02 15:25:32 +00:00
parent
90fd35745c
commit
80eb2cc7d2
@ -146,20 +146,20 @@ where
|
||||
pub fn fetch<'e: 'q, E>(
|
||||
mut self,
|
||||
executor: E,
|
||||
) -> impl Stream<Item = crate::Result<F::Output>> + 'e
|
||||
) -> impl Stream<Item = crate::Result<F::Output>> + Unpin + 'e
|
||||
where
|
||||
'q: 'e,
|
||||
E: RefExecutor<'e, Database = DB> + 'e,
|
||||
F: 'e,
|
||||
F::Output: 'e,
|
||||
{
|
||||
try_stream! {
|
||||
Box::pin(try_stream! {
|
||||
let mut cursor = executor.fetch_by_ref(self.query);
|
||||
while let Some(next) = cursor.next().await? {
|
||||
let mapped = self.mapper.try_map_row(next)?;
|
||||
yield mapped;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Get the first row in the result
|
||||
|
Loading…
x
Reference in New Issue
Block a user