[sqlalchemy] standard way of initializing an empty clause?

2011-06-10 Thread Darren Yin
I want to construct a clause by anding the previous clause with new clauses, and I was wondering if there was a standard way to initialize an empty clause. First, here's some code that illustrates the general idea of what I'm trying to do: clause = True if cond1: clause = and_(clause,

[sqlalchemy] Is there a way to generate this UPDATE statement?

2011-03-12 Thread Darren Yin
The MySQL documentation has the followinghttp://dev.mysql.com/doc/refman/5.1/en/update.htmlexample syntax for multi-table UPDATES: UPDATE items, month SET items.price=month.price WHERE items.id=month.id; Is there a way to generate that via SQLAlchemy? The closest thing to it I could find in the