MagicStack / asyncpg

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

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

Open rossmacarthur opened 1 month ago

rossmacarthur commented 1 month 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.