Skip to content

Commit 7d5962e

Browse files
committed
Add RowIter::rows_affected
1 parent cf9747e commit 7d5962e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

postgres/src/row_iter.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ impl<'a> RowIter<'a> {
1717
it: Box::pin(stream),
1818
}
1919
}
20+
21+
/// Returns the number of rows affected by the query.
22+
///
23+
/// This function will return `None` until the iterator has been exhausted.
24+
pub fn rows_affected(&self) -> Option<u64> {
25+
self.it.rows_affected()
26+
}
2027
}
2128

2229
impl FallibleIterator for RowIter<'_> {

0 commit comments

Comments
 (0)