Skip to content

Commit

Permalink
Add RowIter::rows_affected
Browse files Browse the repository at this point in the history
  • Loading branch information
sfackler committed Mar 27, 2023
1 parent cf9747e commit 7d5962e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions postgres/src/row_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ impl<'a> RowIter<'a> {
it: Box::pin(stream),
}
}

/// Returns the number of rows affected by the query.
///
/// This function will return `None` until the iterator has been exhausted.
pub fn rows_affected(&self) -> Option<u64> {
self.it.rows_affected()
}
}

impl FallibleIterator for RowIter<'_> {
Expand Down

0 comments on commit 7d5962e

Please sign in to comment.