Re:What ORMs have taught me: just learn SQL (2014)
by Too on Saturday September 21, 2019 @03:41AM
(#21034037)
That looks fantastic. No magic mumbo jumbo mapping, just a simple type safe sql. Both syntax safety (no need to remember which of WHERE and HAVING comes first) and type safety on all fields. It's not advertised in the examples on the front page but i also take for granted sql injections are completely impossible since all data goes into functions and are not string formatted, without the mess of having to remember the order of arguments as with prepared statements.
Anyone got tips on similar frameworks for other languages than java and for other dbs.
Re:What ORMs have taught me: just learn SQL (2014)
by xadoc on Saturday September 21, 2019 @06:26AM
(#21034504)
Dapper for C# made by StackOverflow team
Re:What ORMs have taught me: just learn SQL (2014)
by Noumenon72 on Friday September 20, 2019 @10:35PM
(#21033141)
Ye. Static typechecking is the only thing in his list that I really care about, since you can "git gud" at SQL and not be bothered by the syntax/ordering/parser concerns. jOOQ is exactly what I want to bridge the gap between Java and the DB.
Re:What ORMs have taught me: just learn SQL (2014)
by setr on Saturday September 21, 2019 @12:33AM
(#21033542)
The ordering is always a problem, because your logic may not follow it. Eg if your set of conditions apply to multiple queries, then you might know your where conditions before you know your select/from clauses.
So instead of building up your sql string in a straightforward fashion, you need to have at minimum an abstraction that delays construction.
You get lead into vietnam as almost a direct result of SQL’s context-sensitive clauses.
https://www.jooq.org