4 ms·
all the answers aside, imagine a complex SQL query that you can't possibly generate with Django ORM. well, SQLAlchemy will do that for you.
by TheSmoke 11y ago
all the answers aside, imagine a complex SQL query that you can't possibly generate with Django ORM. well, SQLAlchemy will do that for you.
- collyw 11y agoIs it worth it though? I have wrestled the Django ORM into doing some relativley complex queries, but looking back, I am not sure it is worth the effort. The code is more likely to be harder to undersatand by anyone except me, and I started with the equivalent SQL and tweaked the ORM version of the query until it worked. You still need to know the SQL that will be produced when you start using the extra clause. Maybe SQL alchemy is better. I guess I'll find out soon as my new workplace is using it.
- TheSmoke 11y agowell, SQLAlchemy manages to keep the code pythonic and SQL oriented so it's worth it imho. check the core, you will like what it has to offer.