> Is there a simple way of comparing tuples in the SQLAlchemy query
> language, like (User.last_name, User.first_name) < ('Joe', 'Doe')?
> SQL-wise it is possible (at least with PostgreSQL), but you cannot write
> this as a filter expression.

Tried the following, but it does not work:

print session.query(User).filter(
    text("(id, name) < (%(fist_name)s, %(last_name)s)",
    bindparams=[
        bindparam('first_name', 'Joe'),
        bindparam('last_name', 'Doe')]
    )).all()

What's wrong with that?

-- Christoph

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to