之前的写法:

1 Table.query.filter().order_by(" xxx desc ").all()

 

改成如下,加个 text(),问题解决

1 from sqlalchemy.sql import text
2 
3 
4 Table.query.filter().order_by(text(" xxx desc ")).all()

 

相关文章:

  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2022-12-23
相关资源
相似解决方案