sqlalchemy内部if语句

本文共有153个字,关键词:

问题:如何在sqlalchemy语句中进行基本的判断语句
方法:
sections = self.db.query(Section).filter(
Section.id == self.section_id if self.section_id else '').all()

版权声明:本文为作者原创,如需转载须联系作者本人同意,未经作者本人同意不得擅自转载。
添加新评论
暂无评论