|
|
def resultiter(rp):
|
|
""" SQLAlchemy ResultProxies are not iterable to get a
|
|
list of dictionaries. This is to wrap them. """
|
|
keys = rp.keys()
|
|
while True:
|
|
row = rp.fetchone()
|
|
if row is None:
|
|
break
|
|
yield dict(zip(keys, row))
|
|
|
|
|
|
|