4 ms·
I've had bad luck with ORMs in general, mainly because they fall apart whenever I need to do something complicated. The abstraction is just too leaky. However,
by lenticular 8y ago
I've had bad luck with ORMs in general, mainly because they fall apart whenever I need to do something complicated. The abstraction is just too leaky.
However, I've had really good luck with Doobie, a purely functional SQL library in Scala. The big difference is that queries can be manipulated as ordinary pure values, which really lets you do some cool stuff. I actually used these features to significantly speed up a schema change in a large database I was working on.
https://tpolecat.github.io/doobie/docs/01-Introduction.html https://tpolecat.github.io/doobie/docs/01-Introduction.html
- cheez 8y agoGiven your experience (which is replicated all over the world), why not just use ORMs for what they're good at and skip the rest?
- sametmax 8y agoThat's something I don't understand as well. There is no need to go 100% SQL or 100% ORM. You can use raw SQL with the ORM, and the good ones have actually features to make it easy and productive. You don't even need to use the OOP nature of ORM for querying, good ones will have a functional layer for those as well.
- cheez 8y agoIndeed, I often use all 3 in the same file, let alone the same app.