Closed LeonardBesson closed 3 weeks ago
Plausible. I'm not a fan of changing the function signature based on the argument though. I think this should be a separate method, e.g. fetchmany
or something like that (though could be somewhat confusing for DB-API users).
Ability to return values added as fetchmany
in #1175.
Fixes https://github.com/MagicStack/asyncpg/issues/448
This is a proposed change to support
executemany
withINSERT ... RETURNING
.The PR adds a flag parameter to
executemany
, but adding a seperate method likefetchmany
was also mentioned.@elprans would you consider something along those lines? I think the value here is allowing to take advantage of the query pipelining from
executemany
while avoiding the limitations of the proposed workarounds (likeDEFAULT
as mentioned in your stackoverflow post)