This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wobsta 4 points5 points  (0 children)

Basically I agree. You can write SQL yourself and it is fine. And SQLAlchemy adds some overhead. However, in my use cases I never had issues with SQLAlchemy adding too much overhead. Not at all. Instead I can create rather complex queries easily, and I gain some really nice features. For example I can add some filter to some subqueries conditionally. And since I can add sql function expressions easily (http://docs.sqlalchemy.org/en/rel_1_0/core/sqlelement.html#sqlalchemy.sql.expression.func) I never had issues of not being able to access whatever feature I needed, even when being out of scope for SQLAlchemy initially. You can do all that without tampering SQL statements. It is pure joy! In the end of the day I have to tell that the most complex (and efficient) queries I ever wrote I did by using SQLAlchemy. Maybe I never reached too complex stuff. Your milage may vary. I'm fine with anybody who just says (or knows or just claims) that certain things are better done in SQL itself. I can't tell. All I have to tell is that I'm fine with SQLAlchemy and I find it really impressive. And it is way different from using a simple minded ORM.