databases icon indicating copy to clipboard operation
databases copied to clipboard

Implement return rows affected by operation if lastrowid is not set for asyncpg and adopt

Open gvbgduh opened this issue 5 years ago • 2 comments

It's the continuation of the PR https://github.com/encode/databases/pull/150 (as this PR only implements for mysql and sqlite) for the ticket https://github.com/encode/databases/issues/61 to cover other back-ends.

gvbgduh avatar Mar 16 '20 15:03 gvbgduh

Hi @gvbgduh will you proceed with this issue as you described in #150?

collerek avatar Sep 17 '20 10:09 collerek

Please see my comment at https://github.com/encode/databases/issues/61#issuecomment-699499574 for information on how this can be done for asyncpg. In my personal opinion, I think the two values should be returned separately, via a tuple, nametuple or object. The reason is that both pieces of information are ints, it is not clear with the current implementation whether you're getting back a primary key or a row count.

fgimian avatar Sep 27 '20 23:09 fgimian