Suppose there is an SQL statement:
select * from A order by cola
In sqlalchemy we can use this code:
session.query(A).order_by(asc(cola))
Now I want to use "compound order" in SQL:
select * from A order by cola, colb
Then how do I translate it into sqlalchemy code? Can i use:
session.query(A).order_by(asc(cola, colb))
Maybe I can't do it like this.
flypen
source share