You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
asyncpg/docs/api/index.rst
Line 165 in ae5a89d
I don't undestand why nested transaction is necessary here. Can someone elaborate?
The text was updated successfully, but these errors were encountered: