On 30 Jul 2014, at 23:32, Jonathan Vanasco <[email protected]> wrote:
>
>
> On Wednesday, July 30, 2014 3:49:15 PM UTC-4, Michael Bayer wrote:
> order_by('counted')
>
> That generates:
>
> ORDER BY counted
>
> I can't figure out a way to apply `.desc()` (or specify `.asc()`) with that :
>
> ORDER BY counted DESC
>
> I tried going though the docs and constructing various objects that might
> allow me to do something like:
>
> .order_by( foo('counted').desc() )
>
> but I couldn't find the right `foo`, if any.
>
I haven't followed the whole thread, but can't you just use:
.order_by(sa.desc('counted'))
http://docs.sqlalchemy.org/en/rel_0_9/core/sqlelement.html#sqlalchemy.sql.expression.desc)
Simon
--
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.