Closed
Description
Line 165 in ae5a89d
Or, alternatively, you can iterate over the cursor manually (cursor won't be prefetching any rows):
async def iterate(con: Connection):
async with con.transaction():
# Postgres requires non-scrollable cursors to be created
# and used in a transaction.
async with con.transaction():
# Create a Cursor object
cur = await con.cursor('SELECT generate_series(0, 100)')
I don't undestand why nested transaction is necessary here. Can someone elaborate?
Metadata
Metadata
Assignees
Labels
No labels