5 ms·
With jOOQ you still don't write SQL, you write the DSL and still spend a lot of time looking up docs for how to write the query in the DSL, when all you really
by bcoughlan 7y ago
With jOOQ you still don't write SQL, you write the DSL and still spend a lot of time looking up docs for how to write the query in the DSL, when all you really want is to write the SQL query without the ugliness of JDBC. To this end I highly recommend JDBI.
If the Java proposal for multi-line strings ever gets done it will make writing SQL queries a lot nicer.
- jmartrican 7y agoNever heard of JDBI before. Will check it out. Its true there is a lot of DSL looking up. It does decrease over time, but then ramps back up as you do more complicated SQL... lol.
- jmartrican 7y agoPlease note the DSL is a one-to-one mapping to SQL. So its still SQL, you just have to identify the correct method that maps to your SQL element.
- kjeetgill 7y agoSoooorta. It can actually translate between SQL dialects so it's a more like 1:10 mapping.
- lukaseder 7y agoI like that line of thoughts. Given that we have a parser, too, it's more like a 27:27 mapping: https://www.jooq.org/translate https://www.jooq.org/translate
- kjeetgill 7y agoYou're here! I asked you a bunch of questions and even filed a few issues a few months back. You were incredibly patient and helpful as I tried to sort out the performance characteristics of the a few bulk insert approaches. I want to publicly thank you again for all your help. You've set a uniquely high bar with all your work on and around jOOq.
- lukaseder 7y agoThanks for your nice words, I really appreciate it! :)
- zmmmmm 7y ago> If the Java proposal for multi-line strings ever gets done it will make writing SQL queries a lot nicer. Groovy's multiline strings are really nice that way. Groovy essentially bundles its own version of JDBI as well (but better because it does automatic variable interpolation).
- pjmlp 7y agoIt is already accepted for Java 14.
- lukaseder 7y agoI've had people tell me they learned a ton about SQL constructs they were unaware of because they just discovered about them by auto completing on the jOOQ API. If you know SQL, you won't spend much time looking up how the jOOQ API thinks about it, and if something is not possible, you can always use jOOQ's templating feature: https://www.jooq.org/doc/latest/manual/sql-building/plain-sql-templating/ https://www.jooq.org/doc/latest/manual/sql-building/plain-sq... In any case, I always recommend people build a ton of view libraries directly in their database, and then query them with jOOQ when they need dynamic queries on top...