It is currently possible to iterate over Row objects, but only through .into_iter() which means the borrow checker will not also let us look at the columns. Thus, it is hard to write generic code that operates on any Row object.
This PR exposes a .cells() method which allows immutable iteration over the Row object. It also exposes a public constructor for Row objects so that we can write tests for such generic code.
This addresses the iteration half of prisma/tiberius#278.
It is currently possible to iterate over
Row
objects, but only through.into_iter()
which means the borrow checker will not also let us look at the columns. Thus, it is hard to write generic code that operates on anyRow
object.This PR exposes a
.cells()
method which allows immutable iteration over theRow
object. It also exposes a public constructor forRow
objects so that we can write tests for such generic code.This addresses the iteration half of prisma/tiberius#278.