Subscribe to this newsletter here
jOOQ 3.5 Outlook
We’re working hard on the next release. Already 90 issues for jOOQ 3.5 are closed and counting! Today, we’re going to look at the highlights of what will be implemented in the next, exciting minor release, due for Q4 2014:
- Support for new databases
Our customers have been asking us for support of the Informix and Oracle TimesTen databases. While Informix is a very popular (and also old!) database, still widely used in the Industry, Oracle TimesTen is a promising new in-memory database with a very similar syntax to that of Oracle.
With these two new additions, jOOQ will now support 18 RDBMS!
- File-based code generation support
This has been on our roadmap for a very long time, and finally we’re tackling it! If your development workflow prevents you from accessing a database during code generation, you can now also supply database meta information in XML format. We chose XML over any other format as it will be very easy to transform arbitrary pre-existing formats using XSLT (e.g. Hibernate hbm.xml, or ERD tools like Vertabelo‘s export format).
We’re really looking forward to going live with this awesome feature, and in seeing a variety of community-contributed XSLT pop up, to help you integrate jOOQ with your favourite database schema definition format.
- TypeProviders
Sophisticated databases like PostgreSQL ship with a large variety of vendor-specific data types. It’s hard for jOOQ to support them all natively, but why add native support, when we can add another awesome SPI?
TypeProviders will allow for abstracting over the “<T>” type, jOOQ’s column type. This will go far beyond data type conversion, it will allow you to specify how jOOQ will bind your user type to JDBC completely transparently.
These are just a few major features that we’ll be including in jOOQ 3.5, along with a lot of minor ones – so stay tuned for more jOOQ goodness.
Data Geekery Partner Network
Isaac Newton coined it like no one else:
If I have seen further it is by standing on ye sholders of Giants.
At Data Geekery, we’re looking into seeing further with jOOQ as well as we are now starting to offer and recommend services to the jOOQ ecosystem through our trusted integration partners. Today, we’re happy to recommend to you:
Germany based UWS Software Service (UWS) specialises in custom software development, application modernisation and outsourcing with a distinct focus on the Java Enterprise ecosystem.
UWS has successfully integrated the jOOQ Open-Source Edition with a variety of enterprise software projects. Their offering include custom jOOQ integrations into your system landscape and migration solutions from JDBC and/or JPA to jOOQ. UWS further offers development of custom enterprise applications using jOOQ.
“Almost every performance problem is caused by excessive use of ORM tools or improper indexing.”
Markus Winand specialises in these topics and provides SQL training and tuning services for developers. “It is difficult to tell Java developers to use SQL when Hibernate is not the right tool for a particular query” Winand said, and continued “JDBC is just too cumbersome and dangerous. jOOQ makes SQL in Java simple and safe—now I can show people how to get best of both worlds.”
Tweet of the Day
Our customers, users, and followers are sharing their love for jOOQ with the world and we can hardly catch up with them! Here are:
Majid Azimi, who is writing SQL like a boss with jOOQ
@JavaOOQ = Write #SQL like a boss…—
Majid Azimi (@majidazimi) August 05, 2014
Christoph Henkelmann, who Has found the most awesome of all stacks to build great web applications. And that consists of Ninjaframework, jOOQ, BoneCP – Slim, Fast, Reliable. We couldn’t have said it any better, ourselves.
java 8 + @ninjaframework + @JavaOOQ + BoneCP => web/REST dev bliss. Finally the slim, fast, reliable stack I was looking for. YAY \o/—
Christoph Henkelmann (@chenkelmann) August 08, 2014
Nat Pryce, who simply loves doing SQL queries with jOOQ in Java 8.
JOOQ is a v nice way of doing SQL queries in Java 8—
Nat Pryce (@natpryce) August 11, 2014
Thanks for the shouts, guys! You make the jOOQ experience rock!
SQL Zone – Keyset Pagination
Markus Winand, author of Use The Index, Luke! has recently started a promotion against OFFSET pagination, in favour of keyset pagination, which he called #NoOffset.
We’ve blogged about this ourselves, before. Most people make use of OFFSET pagination because it is the default that is supported by almost all RDBMS.
In many cases, however, you do not need to paginate using OFFSETs, which can turn out to be very slow for large results and large offsets. Keyset pagination is very useful when you want to implement infinite scrolling, like Twitter, Facebook, etc.
jOOQ is one of the few APIs, and the only Java API that natively support keyset pagination.
SQL Zone – PIVOT your data
Every now and then, you have one of those fancy reporting problems where SQL just fits in perfectly. We’ve blogged about it: Are You Using PIVOT Yet?
With the Oracle and SQL Server PIVOT clause, it is very easy to flip rows and columns in a table. Imagine you have a table like this:
+------+----------------+-------------------+ | dnId | propertyName | propertyValue | +------+----------------+-------------------+ | 1 | objectsid | S-1-5-32-548 | | 1 | _objectclass | group | | 1 | cn | Account Operators | | 1 | samaccountname | Account Operators | | 1 | name | Account Operators | | 2 | objectsid | S-1-5-32-544 | | 2 | _objectclass | group | | 2 | cn | Administrators | | 2 | samaccountname | Administrators | | 2 | name | Administrators | | 3 | objectsid | S-1-5-32-551 | | 3 | _objectclass | group | | 3 | cn | Backup Operators | | 3 | samaccountname | Backup Operators | | 3 | name | Backup Operators | +------+----------------+-------------------+
And now, you’d like to transform this table to the below:
+------+--------------+--------------+-------------------+----- | dnId | objectsid | _objectclass | cn | ... +------+--------------+--------------+-------------------+----- | 1 | S-1-5-32-548 | group | Account Operators | ... | 2 | S-1-5-32-544 | group | Administrators | ... | 3 | S-1-5-32-551 | group | Backup Operators | ... +------+--------------+--------------+-------------------+-----
This is a piece of cake using PIVOT:
SELECT p.* FROM ( SELECT dnId, propertyName, propertyValue FROM myTable ) AS t PIVOT( MAX(propertyValue) FOR propertyName IN ( objectsid, _objectclass, cn, samaccountname, name ) ) AS p;
jOOQ natively supports the PIVOT clause, which is definitely one of those tools to have on every reporting SQL developer’s tool chain. Read more about it here and here (original source on Stack Overflow).
Filed under: jooq-newsletter Tagged: Code generation, Data Geekery, Data Geekery Partner, Data Geekery Partner Network, Informix, jOOQ 3.5, KEYSET pagination, Markus Winand, OFFSET pagination, Oracle TimesTen, Partner, PIVOT clause, sql, TypeProviders, Use-The-Index-Luke, UWS, UWS Software Service
