|
|
|
|
|
by applejacks
1361 days ago
|
|
Sure, this is a simple example -- and you are right, if you are just writing a few selects, you may not find any value. ORMs (or query-builders, as some like to draw a distinction there) become more valuable as you use them to compose and transform queries. SQL is decidedly not composable. |
|
My experience with ORMs is that they’re a minefield of performance cliffs. It’s easy to accidentally generate suboptimal SQL or introduce additional round trips unless you’re very careful about the code you write, at which point you might as well write SQL directly and be at the mercy of one less black box.