エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
SQLAlchemy ORDER BY DESCENDING?
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
SQLAlchemy ORDER BY DESCENDING?
How can I use ORDER BY descending in a SQLAlchemy query like the following? This query works, but... How can I use ORDER BY descending in a SQLAlchemy query like the following? This query works, but returns them in ascending order: query = (model.Session.query(model.Entry) .join(model.ClassificationItem) .join(model.EnumerationValue) .filter_by(id=c.row.id) .order_by(model.Entry.amount) # This row :) ) If I try: .order_by(desc(model.Entry.amount)) then I get: NameError: global name 'desc' is not