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