Re:What ORMs have taught me: just learn SQL (2014)
by EGreg on Monday June 27, 2016 @12:55AM
(#11984265)
ORMs let you structure your queries in a way that allows the app to understand them and analyze them, for sharding purposes. True, you can write SQL and then parse it yourself in a proxy, but why?
[ Parent
| on HN ]
Re:What ORMs have taught me: just learn SQL (2014)
by z92 on Monday June 27, 2016 @02:04AM
(#11984415)
If your ORM allows you to drop down to SQL, which the parent claims all modern ORMs do, then you will still need that SQL parser in your ORM.
Re:What ORMs have taught me: just learn SQL (2014)
by EGreg on Monday June 27, 2016 @02:12PM
(#11988121)
You can have a small subset of your queries in raw SQL and if you really need to shard them, you mark them up with structured metadata. But the rest would be automatically structured, analyzed and sharded.
Re:What ORMs have taught me: just learn SQL (2014)
by lmm on Monday June 27, 2016 @06:08AM
(#11985165)
Sure. So you can use the SQL parser from a mature, widely used library, or you can write your own. I know which option I would prefer, even if I was writing every single query by hand (not that I'd ever do that).