3 ms·
Something like jOOQ? https://www.jooq.org https://www.jooq.org
by noisem4ker 7y ago
Something like jOOQ?
https://www.jooq.org https://www.jooq.org
- Noumenon72 7y agoYe. 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.
- setr 7y agoThe 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.
- spion 7y agoOr you could go with LINQ's approach from (x) where (y) select (z). Honestly, I think LINQ and entity framework successfully solved most ORM concerns
- Too 7y agoThat 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.
- xadoc 7y agoDapper for C# made by StackOverflow team https://github.com/StackExchange/Dapper https://github.com/StackExchange/Dapper