赞
踩
摘要:with_entities用法Flask 的flask_sqlalchemy查询指定列并去重_范翻番樊的博客-CSDN博客_sqlalchemy 去重通过使用with_entities()方法来获取要在结果中返回的列# 查询制定的id列result = RiskDataModel.query.with_entities(RiskDataModel.id) # 返回BaseQuery# 返回指定的两列result = RiskDataModel.query.with_entities(RiskDataModel.id, Risk...https://blog.csdn.net/u011361138/article/details/82260111