0

This is additional question to my previous one here - How to access column values in SQLAlchemy result list after a join a query.

I have this join query.

result = db.query(Order, Item).join(Item, Item.order_id == Order.internal_id, isouter=True).filter(Item.order_id == order_id).all()

How do I get all the column names of the result?

experimental
  • 129
  • 1
  • 10

1 Answers1

0

Query has a column_descriptions attribute. So you can do result.column_descriptions

Checkout this Query page for more detail and example.

Abhishek
  • 333
  • 4
  • 12