Home » Tag Archives: jOOQ (page 4)

Tag Archives: jOOQ

Using jOOQ with Spring: CRUD

jOOQ is a library which helps us to get back in control of our SQL. It can generate code from our database and lets us build typesafe database queries by using its fluent API. The earlier parts of this tutorial have taught us how we can configure the application context of our example application and generate code from our database. ...

Read More »

Java 8 Friday Goodies: SQL ResultSet Streams

java-interview-questions-answers

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… Java 8 Friday Every Friday, ...

Read More »

JOOQ Facts: SQL functions made easy

The JDBC API has always  been cumbersome and error-prone and I’ve never been too fond of using it. The first major improvement was brought by the Spring JDBC framework which simply revitalized the JDBC usage with its JdbcTemplate or the SqlFunction classes, to name a few. But Spring JDBC doesn’t address the shortcoming of using string function or input parameters ...

Read More »

Using jOOQ with Spring: Code Generation

As we might remember from the first part of this tutorial, jOOQ states that jOOQ generates Java code from your database and lets you build typesafe SQL queries through its fluent API. The first part of this tutorial describes how we can configure the application context of a Spring powered application which uses jOOQ but it doesn’t describe how we ...

Read More »

Using jOOQ with Spring: Configuration

spring-interview-questions-answers

I have had my share of performance problems caused by ORMs. Although I have to admit that most of these problems were really caused by yours truly, I have started to think that using ORMs in read-only operations is not worth it. I started to look for alternative ways to implement these operations. That is how I ran into jOOQ ...

Read More »

JOOQ Facts: From JPA Annotations to JOOQ Table Mappings

JOOQ is a neat framework, and it addresses a long issue I’ve had with advanced dynamic filtered queries. While Hibernate and JPA come with a useful Criteria API, which I’ve been using for quite some time, there are understandable limits to what you can do with those. For instance, you cannot go beyond simple SQL operations (e.g JOINS, NESTED SLECTS, ...

Read More »

Arcane magic with the SQL:2003 MERGE statement

Every now and then, we feel awkward about having to distinguish INSERT from UPDATE for any of the following reasons: We have to issue at least two statements We have to think about performance We have to think about race conditions We have to choose between [UPDATE; IF UPDATE_COUNT = 0 THEN INSERT] and [INSERT; IF EXCEPTION THEN UPDATE] We ...

Read More »

GROUP BY ROLLUP / CUBE

Every now and then, you come across a requirement that will bring you to your SQL limits. Many of us probably give up early and calculate stuff in Java / [or your language]. Instead, it might’ve been so easy and fast to do with SQL. If you’re working with an advanced database, such as DB2, Oracle, SQL Server, Sybase SQL ...

Read More »

Overload API methods with care

Overloading methods is a strong concept in API design, especially when your API is a fluent API or DSL (Domain Specific Language). This is the case for jOOQ, where you often want to use the exact same method name for various means of interaction with the library. Example: jOOQ Conditions package org.jooq; public interface Condition { // Various overloaded forms ...

Read More »