- Notifications
You must be signed in to change notification settings - Fork 437
Closed
Description
Line 165 in ae5a89d
| asyncwith con.transaction(): |
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?
iHelos and ulturgashev
Metadata
Metadata
Assignees
Labels
No labels