python-trio / triopg

PostgreSQL client for Trio based on asyncpg
Other
45 stars 8 forks source link

Proxy asyncpg cursors #6

Closed oohlaf closed 4 years ago

oohlaf commented 4 years ago

I would like to use the following

    async with db_pool.acquire() as conn:
        async with conn.transaction():
            async for record in conn.cursor("SELECT * FROM users"):
                # do something with record

But the __aiter__ and cursor methods are not proxied by Triopg.

touilleMan commented 4 years ago

implemented by #9 \o/