jOOQ 3.15’s New Multiset Operator Will Change How You Think About SQL

This is how SQL should have been used all along. They called it The Third Manifesto, ORDBMS, or other things. Regrettably, it never really took off. Because most vendors didn't adopt it. And those who did, didn't agree on syntax. But this is about to change. Thanks to the now ubiquitous SQL/JSON support (which jOOQ … Continue reading jOOQ 3.15’s New Multiset Operator Will Change How You Think About SQL

Nesting Collections With jOOQ 3.14’s SQL/XML or SQL/JSON support

One of the main features of ORMs is M as in Mapping. Libraries like jOOQ help auto-mapping flat or nested database records onto Java classes that have the same structure as the SQL result set. The following has always been possible in jOOQ, assuming PostgreSQL's INFORMATION_SCHEMA (using the generated code from the jOOQ-meta module): class … Continue reading Nesting Collections With jOOQ 3.14’s SQL/XML or SQL/JSON support

Using SQL Server FOR XML and FOR JSON Syntax on Other RDBMS With jOOQ

SQL Server supports transforming flat tabular SQL result sets into hierarchical structures by convention using the convenient FOR XML or FOR JSON syntaxes. This is really convenient and less verbose than the standard SQL/XML or SQL/JSON APIs - although the standard ones are more powerful. In this blog post, I'd like to show a few … Continue reading Using SQL Server FOR XML and FOR JSON Syntax on Other RDBMS With jOOQ

Stop Mapping Stuff in Your Middleware. Use SQL’s XML or JSON Operators Instead

It's been a while since I've ranted on this blog, but I was recently challenged by a reddit thread to write about this topic, so here goes... So, you're writing a service that produces some JSON from your database model. What do you need? Let's see: Read a book on DDD Read another book on … Continue reading Stop Mapping Stuff in Your Middleware. Use SQL’s XML or JSON Operators Instead

How to Implement Your Own XJC Plugin to Generate toString(), equals(), and hashCode() Methods

When you work with JAXB to generate Java code from XSD (or *ghasp* WSDL) files, you're going to use the XJC tool, which is shipped with the JDK (at least until JDK 9 - with Jigsaw, it will soon be externalised into its own external dependency). Adding plugins to XJC when running it via Maven … Continue reading How to Implement Your Own XJC Plugin to Generate toString(), equals(), and hashCode() Methods

When to Choose SQL and When to Choose NoSQL

Some people make architecture decisions purely based on the loudest consultant: https://twitter.com/gareth/status/778575385600688129 For most others, however, decisions are not as simple as this. For instance: When should we start evaluating NoSQL storage systems as an alternative to RDBMS? RDBMS as the hammer for all nails This question obviously assumes that you're starting out with an … Continue reading When to Choose SQL and When to Choose NoSQL

Please, Java. Do Finally Support Multiline String Literals

I understand the idea of Java-the-language being rather hard to maintain in a backwards-compatible way. I understand the idea of JDK API, such as the collections, to be rather tough not to break. Yes. I don't understand why Java still doesn't have multiline string literals. How often do you write JDBC code (or whatever other … Continue reading Please, Java. Do Finally Support Multiline String Literals

Java 8 Friday Goodies: Lambdas and XML

At Data Geekery, we love Java. And as we're really into jOOQ's fluent API and query DSL, we're absolutely thrilled about what Java 8 will bring to our ecosystem. We have blogged a couple of times about some nice Java 8 goodies, and now we feel it's time to start a new blog series, the... … Continue reading Java 8 Friday Goodies: Lambdas and XML

How to Speed Up Apache Xalan’s XPath Processor by Factor 10x

There has been a bit of an awkward bug in Apache Xalan for a while now, and that bug is XALANJ-2540. The effect of this bug is that an internal SPI configuration file is loaded by Xalan thousands of times per XPath expression evaluation, which can be measured easily as such: this: Element e = (Element) … Continue reading How to Speed Up Apache Xalan’s XPath Processor by Factor 10x

A jOOX First-Time Experience Article

Here's some nice first-time user experience about jOOX, my lesser-known product: http://www.kubrynski.com/2013/03/as-developer-i-want-to-use-xml.html As a reminder, here's what jOOX is all about: jOOX stands for Java Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, to allow for fluent XML document creation and manipulation where DOM is required but too verbose. jOOX only … Continue reading A jOOX First-Time Experience Article