4 ms·
> But no ORM will ever give me the actual flexibility and performance of raw SQL queries (unless it becomes SQL itself). Enter SQLAlchemy Expressions. The rea
by blattimwind 8y ago
> But no ORM will ever give me the actual flexibility and performance of raw SQL queries (unless it becomes SQL itself).
Enter SQLAlchemy Expressions.
The reason why that's actually an excellent idea is twofold: For one, the entity-mapping part (i.e. you can write very complex queries and still get your mapped objects back), the other is that you're essentially writing the AST of your SQL queries using real objects, so it's very easy to manipulate and reuse, which is quite hard to do with textual SQL. (Also it's easy to mix textual SQL and SQL expressions in SQLAlchemy; but the need to do that is very, very rare indeed).