Closed
Description
With the following query
INSERT INTO people (name) VALUES ($1)
RETURNING id
and values to create [('anne',), ('ben',), ('charlie',)]
.
I believe there's currently no way with asyncpg to execute this single query and get all the ids returned.
I've tried:
executemany
but the result is discardedfetch
but that doesn't extend to executing manyfetch
while casting the argument to an array::TEXT[][]
but I either get a syntax error or a single value of the stringified list insert.
In short: would it be possible for executemany
to return the result?