2 ms·
> As an example, it's pretty common to hear that people should prefer writing raw SQL to using an ORM or query builder because those are both "leaky abstraction
by sergiosgc 7y ago
> As an example, it's pretty common to hear that people should prefer writing raw SQL to using an ORM or query builder because those are both "leaky abstractions"
The takeaway of ORMs being leaky abstractions is that they should expose the lower abstraction. An ORM builds the query for you 90% of the time, but when (not if) you need to write raw SQL, the ORM should be able to integrate the raw SQL output in its flow.
An example of an ORM that does this beautifully is SQLAlchemy [https://www.sqlalchemy.org/ https://www.sqlalchemy.org/]