I\'m trying to find a way to cause SQLAlchemy to generate a query of the following form:
select * from t where (a,b) in ((a1,b1),(a2,b2));
Is this poss
Use tuple_:
tuple_
keys = [(a1, b1), (a2, b2)] session.query(T).filter(tuple_(T.a, T.b).in_(keys)).all()
http://docs.sqlalchemy.org/en/latest/core/sqlelement.html#sqlalchemy.sql.expression.tuple_