A RowProxy
is not a mapped class, as the error is telling you. It represents a lower level of abstraction and models a database result row "directly" – no ORM involved. Reading the documentation, a RowProxy
is partly akin to an ordered dictionary, and provides the mapping interface, so you can use keys()
and items()
to iterate over keys and key, item tuples respectively. If you iterate over a RowProxy
instance, you get the values.
So if you want to iterate over the key, value tuples of a row:
for row in result:
for key, value in row.items():
pass