diff --git a/postgres/src/row_iter.rs b/postgres/src/row_iter.rs index 772e9893c..221fdfc68 100644 --- a/postgres/src/row_iter.rs +++ b/postgres/src/row_iter.rs @@ -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 { + self.it.rows_affected() + } } impl FallibleIterator for RowIter<'_> {