Odd- this isn't the narrative docs
You can use column attributes...
(http://docs.sqlalchemy.org/en/latest/core/sqlelement.html#sqlalchemy.sql.expression.ColumnElement.desc)
session.query(model.Foo).order_by(model.Foo.id.desc())
session.query(model.Foo).order_by(model.Foo.id.asc())
session.query(model.Foo).order_by(model.Foo.id.desc().
model.Foo.id_b.asc())
There's also some sql expression in another
package...
http://docs.sqlalchemy.org/en/latest/core/sqlelement.html#sqlalchemy.sql.expression.desc
session.query(model.Foo).order_by(desc(model.Foo.id))
If you have a column the standard way is to just do `column.asc()`
Using the `desc(column)` syntax is really only necessary when using literal
sql or very complex queries.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.