> Odd- this isn't the narrative docs

Thanks for your clarification.


> You can use column attributes...
> (http://docs.sqlalchemy.org/en/latest/core/sqlelement.html#sqlalchemy.sql.expression.ColumnElement.desc)

Would it help to add a few more descriptions (and links) to the section
for the query method "order_by"?
http://docs.sqlalchemy.org/en/rel_1_0/orm/query.html#sqlalchemy.orm.query.Query.order_by


>     session.query(model.Foo).order_by(model.Foo.id.desc(). 
> model.Foo.id_b.asc())

Is the specification "desc()." really appropriate in this parameter list 
example?


> There's also some sql expression in another package...
> http://docs.sqlalchemy.org/en/latest/core/sqlelement.html#sqlalchemy.sql.expression.desc

Thanks for your links.


> If you have a column the standard way is to just do `column.asc()`

I find the detail interesting that the sort direction needs to be written
as a method call instead of passing a corresponding parameter value.


> Using the `desc(column)` syntax is really only necessary when using literal 
> sql
> or very complex queries.

I imagine that I will need this variant for my use case of sorting
computed query fields, won't I?

Regards,
Markus

-- 
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 sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to