Most of us separate development data from production data, physically or at least, logically (except maybe Chuck Norris (official website, no kidding!)). If you're lucky and you can afford multiple Oracle / other-expensive-database licenses, you might clone the same schema / owner name for every application instance on different servers. But sometimes, you can't do … Continue reading Development schema, production schema
Op4j and Lambda-J. For more fluency in Java
I recently blogged about simple constructs, such as Java's Arrays.asList() and the fact that it is not used often enough: https://blog.jooq.org/javas-arrays-aslist-is-underused/ I like to work with fluent API's, which are still quite a rare thing in the Java world, compared to other languages that support features such as language extensions, operator overloading, true generics, extension … Continue reading Op4j and Lambda-J. For more fluency in Java
Use jOOQ inside your H2 database
I recently became aware of an interesting use-case for jOOQ when I was optimising my own H2 database integration tests: H2 stored functions H2 knows two operation modes for stored functions: "Inline mode" with source code provided "Reference mode" referencing a public static method of a Java class on the databases' classpath The above terms … Continue reading Use jOOQ inside your H2 database
SQL DSL’s in other languages
Like jOOQ, there are many other tools out there, that aim to implement SQL as an internal DSL in other languages. This one is particularly nice-looking. It's called sqlkorma, a SQL DSL for Clojure. A sample SQL statement taken from their documentation: (select users (with address) ;; include other entities based on ;; their relationship … Continue reading SQL DSL’s in other languages
jOOQ Tutorial by Ikai Lan
A friend of mine recently found a nice tutorial about jOOQ on the web: http://ikaisays.com/2011/11/01/getting-started-with-jooq-a-tutorial This was written by Ikai Lan, a Google App Engine developer. See also my previous blog post about a jOOQ integration example with Google Cloud SQL: https://blog.jooq.org/jooq-and-google-cloud-sql-example/
What feature are you missing most in jOOQ?
This is your chance to influence future developments!
The comprehensive SQL bitwise operations compatibility list
One of the rather nasty, off-the-beaten-track battlefields in SQL non-standards are bitwise operations. To my knowledge, they're not in any SQL standard (I've checked SQL:2008 drafts), but almost all databases support some form of bitwise operations. Here's the relevant MySQL documentation page, as an example: https://dev.mysql.com/doc/refman/5.5/en/bit-functions.html So we're talking about these operations: bit_count(), and (&), … Continue reading The comprehensive SQL bitwise operations compatibility list
Derby casting madness – the sequel
I have recently blogged about the general bind variable casting madness in SQL: https://blog.jooq.org/rdbms-bind-variable-casting-madness/ So this is the sequel of the above story, purely dedicated to Derby with its "conversion table from hell". One of jOOQ's goals is to make SQL as compatible as possible across various databases, in a way that you can re-use … Continue reading Derby casting madness – the sequel
Java’s Arrays.asList(…) is underused
Writing nice and concise code is feasible in Java as well, not only in those hyped, new, and fancy scripting languages. Here are some examples on how to use the Java 5 varargs Arrays.asList() method in nice contexts: Run a block for n constant values // If you have VAL_A, VAL_B, VAL_C and you want … Continue reading Java’s Arrays.asList(…) is underused
jOOQ in the wild
The first open source projects start to appear on the web with public dependencies on jOOQ. One of them is a small backup tool called blizzys-backup by Maik Schreiber. It uses jOOQ to handle a small H2 database with 3-4 relations describing scheduled backups and backup-file meta data. Interestingly, Maik seems to prefer lazy fetching … Continue reading jOOQ in the wild
