【发布时间】:2019-05-23 22:07:15
【问题描述】:
在Python中使用asyncpg执行insert语句,使用returning id语法获取每个insert的ID,但返回的是“INSERT 0 1”
Python 3.5
asyncpg(使用连接池)
【问题讨论】:
-
我在
con.execute()之后没有看到任何con.fetchone()? -
所以我需要使用 fetchval 吗?
标签: python python-3.x postgresql asyncpg