4 ms·
> Also, all ORMs let you do raw SQL because there will be times where the ORM abstraction will be too cumbersome. "Learn how to master {flavor} ORM and when yo
by qudat 6y ago
> Also, all ORMs let you do raw SQL because there will be times where the ORM abstraction will be too cumbersome.
"Learn how to master {flavor} ORM and when you've spent hours digging through documentation, stack overflow posts, and src code to find it isn't simple to do in {flavor}, use raw SQL."
This argument that "you can always drop into raw SQL" skips the fact that the code will not be merged if it can be done in the ORM because ThisIsTheWay(tm).
I find query builders to be a nice blend between raw SQL and the ability to write programmatic queries. The APIs tend to be relatively consistent between libraries since they map directly to SQL statements.