MagicStack / asyncpg

A fast PostgreSQL Database Client Library for Python/asyncio.
Apache License 2.0
6.99k stars 404 forks source link

Add `fetchmany` to execute many *and* return rows #1175

Closed rossmacarthur closed 3 weeks ago

rossmacarthur commented 2 months ago

Fixes #448

This change adds a fetchmany method to Pool, Connection, and PreparedStatement which allows you execute INSERT ... RETURNING with a list of values and get the result.