Oracle LONG and LONG RAW Causing “Stream has already been closed” Exception

Like many old databases, Oracle has legacy data types, which are rather nasty to work with in every day SQL. Usually, you don't run into wild encounters of LONG and LONG RAW data types anymore, but when you're working with an old database, or with the dictionary views, you might just have to deal with … Continue reading Oracle LONG and LONG RAW Causing “Stream has already been closed” Exception

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

JEP 277 “Enhanced Deprecation” is Nice. But Here’s a Much Better Alternative

Maintaining APIs is hard. We're maintaining the jOOQ API which is extremely complex. But we are following relatively relaxed rules as far as semantic versioning is concerned. When you read comments by Brian Goetz and others about maintaining backwards-compatibility in the JDK, I can but show a lot of respect for their work. Obviously, we … Continue reading JEP 277 “Enhanced Deprecation” is Nice. But Here’s a Much Better Alternative

How to Fill Sparse Data With the Previous Non-Empty Value in SQL

The following is a very common problem in all data related technologies and we're going to look into two very lean, SQL-based solutions for it: How do I fill the cells of a sparse data set with the "previous non-empty value"? The problem The problem is really simple and I'm reusing the example provided by … Continue reading How to Fill Sparse Data With the Previous Non-Empty Value in SQL

Reactive Database Access – Part 2 – Actors

Notice that the examples in this article may be outdated, as Typesafe's Activator works differently now. The blog post will not be maintained to provide up-to-date Activator examples. We're very happy to continue our a guest post series on the jOOQ blog by Manuel Bernhardt. In this blog series, Manuel will explain the motivation behind … Continue reading Reactive Database Access – Part 2 – Actors

jOOQ Tuesdays: Rafael Winterhalter is Wrestling Byte Code with Byte Buddy

Welcome to the jOOQ Tuesdays series. In this series, we’ll publish an article on the third Tuesday every other month where we interview someone we find exciting in our industry from a jOOQ perspective. This includes people who work with SQL, Java, Open Source, and a variety of other related topics. We have the pleasure … Continue reading jOOQ Tuesdays: Rafael Winterhalter is Wrestling Byte Code with Byte Buddy

SQL GROUP BY and Functional Dependencies: A Very Useful Feature

Relational databases define the term "Functional Dependency" as such (from Wikipedia): In relational database theory, a functional dependency is a constraint between two sets of attributes in a relation from a database. In other words, functional dependency is a constraint that describes the relationship between attributes in a relation. In SQL, functional dependencies appear whenever … Continue reading SQL GROUP BY and Functional Dependencies: A Very Useful Feature

3 Reasons why You Shouldn’t Replace Your for-loops by Stream.forEach()

Awesome! We're migrating our code base to Java 8. We'll replace everything by functions. Throw out design patterns. Remove object orientation. Right! Let's go! Wait a minute Java 8 has been out for over a year now, and the thrill has gone back to day-to-day business. A non-representative study executed by baeldung.com from May 2015 … Continue reading 3 Reasons why You Shouldn’t Replace Your for-loops by Stream.forEach()

Reactive Database Access – Part 1 – Why “Async”

Notice that the examples in this article may be outdated, as Typesafe's Activator works differently now. The blog post will not be maintained to provide up-to-date Activator examples. We're very happy to announce a guest post series on the jOOQ blog by Manuel Bernhardt. In this blog series, Manuel will explain the motivation behind so-called … Continue reading Reactive Database Access – Part 1 – Why “Async”

A Subtle AutoCloseable Contract Change Between Java 7 and Java 8

A nice feature of the Java 7 try-with-resources statement and the AutoCloseable type that was introduced to work with this statement is the fact that static code analysis tools can detect resource leaks. For instance, Eclipse: When you have the above configuration and you try running the following program, you'll get three warnings: public static … Continue reading A Subtle AutoCloseable Contract Change Between Java 7 and Java 8