Is it possible to generate an explicit CROSS JOIN query with SQLAlchemy as the following example:
SELECT * FROM foo CROSS JOIN bar
And if
You can make cartesian product using inner join, applying condition which is always true. E.g. for SQLAlchemy ORM:
from sqlalchemy.sql.expression import literal session.query(Foo, Bar).join(Bar, literal(True)).all()
There're only join and outerjoin functions in SQLAlchemy for now (v0.9).
join
outerjoin