使用SQLAlchemy为查询指定自定义(Realdict)游标

时间:2015-05-28 07:55:40

标签: python postgresql sqlalchemy cursor

我们可以在通过SQLAlchemy执行查询时指定不同的游标 我希望能够使用with connection: result = connection.execute(select(columns_to_select).where(clause)) row = result.fetchone() 游标(如本文所述:http://alexharvey.eu/database/postgresql/postgresql-query-result-as-python-dictionary/)和SQLAlchemy

这是查询执行方式的示例代码:

find()

0 个答案:

没有答案