Share jOOQ on Facebook
Share jOOQ on Twitter

This page in other versions: 3.9 | 3.8 | 3.7 | 3.6 | 3.5 | 3.4 | 3.3 | Old, end-of-life releases: 3.2 | 3.1 | 3.0 | 2.6 | 2.5

# Overview

This manual is divided into six main sections:

  • Getting started with jOOQ

    This section will get you started with jOOQ quickly. It contains simple explanations about what jOOQ is, what jOOQ isn't and how to set it up for the first time

  • SQL building

    This section explains all about the jOOQ syntax used for building queries. It explains the central factories, the supported SQL statements and various other syntax elements

  • Code generation

    This section explains how to configure and use the built-in source code generator

  • SQL execution

    This section will get you through the specifics of what can be done with jOOQ at runtime, in order to execute queries, perform CRUD operations, import and export data, and hook into the jOOQ execution lifecycle for debugging

  • Tools

    This section is dedicated to tools that ship with jOOQ, such as the jOOQ console

  • Reference

    This section is a reference for elements in this manual

Table of contents

1.
Preface
2.
Copyright, License, and Trademarks
3.
Getting started with jOOQ
3.1.
How to read this manual
3.2.
The sample database used in this manual
3.3.
Different use cases for jOOQ
3.3.1.
jOOQ as a SQL builder
3.3.2.
jOOQ as a SQL builder with code generation
3.3.3.
jOOQ as a SQL executor
3.3.4.
jOOQ for CRUD
3.3.5.
jOOQ for PROs
3.4.
Tutorials
3.4.1.
jOOQ in 7 easy steps
3.4.1.1.
Step 1: Preparation
3.4.1.2.
Step 2: Your database
3.4.1.3.
Step 3: Code generation
3.4.1.4.
Step 4: Connect to your database
3.4.1.5.
Step 5: Querying
3.4.1.6.
Step 6: Iterating
3.4.1.7.
Step 7: Explore!
3.4.2.
Using jOOQ in modern IDEs
3.4.3.
Using jOOQ with Spring
3.4.4.
A simple web application with jOOQ
3.5.
jOOQ and Scala
3.6.
Dependencies
4.
SQL building
4.1.
The Factory class
4.1.1.
SQL Dialect
4.1.2.
Connection vs. DataSource
4.1.3.
Custom Settings
4.1.4.
Runtime schema and table mapping
4.1.5.
Factory subclasses
4.2.
SQL Statements
4.2.1.
jOOQ's DSL and non-DSL API
4.2.2.
The SELECT statement
4.2.2.1.
The SELECT clause
4.2.2.2.
The FROM clause
4.2.2.3.
The JOIN clause
4.2.2.4.
The WHERE clause
4.2.2.5.
The CONNECT BY clause
4.2.2.6.
The GROUP BY clause
4.2.2.7.
The HAVING clause
4.2.2.8.
The ORDER BY clause
4.2.2.9.
The LIMIT .. OFFSET clause
4.2.2.10.
The FOR UPDATE clause
4.2.2.11.
UNION, INTERSECTION and EXCEPT
4.2.2.12.
Oracle-style hints
4.2.3.
The INSERT statement
4.2.4.
The UPDATE statement
4.2.5.
The DELETE statement
4.2.6.
The MERGE statement
4.2.7.
The TRUNCATE statement
4.3.
Table expressions
4.3.1.
Generated Tables
4.3.2.
Aliased Tables
4.3.3.
Joined tables
4.3.4.
Nested SELECTs
4.3.5.
The Oracle 11g PIVOT clause
4.3.6.
jOOQ's relational division syntax
4.3.7.
Array and cursor unnesting
4.3.8.
The DUAL table
4.4.
Column expressions
4.4.1.
Table columns
4.4.2.
Aliased columns
4.4.3.
Cast expressions
4.4.4.
Arithmetic expressions
4.4.5.
String concatenation
4.4.6.
General functions
4.4.7.
Numeric functions
4.4.8.
Bitwise functions
4.4.9.
String functions
4.4.10.
Date and time functions
4.4.11.
System functions
4.4.12.
Aggregate functions
4.4.13.
Window functions
4.4.14.
Grouping functions
4.4.15.
User-defined functions
4.4.16.
User-defined aggregate functions
4.4.17.
The CASE expression
4.4.18.
Sequences and serials
4.4.19.
Tuples or row value expressions
4.5.
Conditional expressions
4.5.1.
Condition building
4.5.2.
AND, OR, NOT boolean operators
4.5.3.
Comparison predicate
4.5.4.
Quantified comparison predicate
4.5.5.
NULL predicate
4.5.6.
DISTINCT predicate
4.5.7.
BETWEEN predicate
4.5.8.
LIKE predicate
4.5.9.
IN predicate
4.5.10.
EXISTS predicate
4.5.11.
OVERLAPS predicate
4.6.
Plain SQL
4.7.
Bind values and parameters
4.7.1.
Indexed parameters
4.7.2.
Named parameters
4.7.3.
Inlined parameters
4.7.4.
SQL injection and plain SQL QueryParts
4.8.
QueryParts
4.8.1.
SQL rendering
4.8.2.
Pretty printing SQL
4.8.3.
Variable binding
4.8.4.
Extend jOOQ with custom types
4.8.5.
Plain SQL QueryParts
4.8.6.
Serializability
4.9.
SQL building in Scala
5.
SQL execution
5.1.
Comparison between jOOQ and JDBC
5.2.
Query vs. ResultQuery
5.3.
Fetching
5.3.1.
Record vs. TableRecord
5.3.2.
Arrays, Maps and Lists
5.3.3.
RecordHandler
5.3.4.
RecordMapper
5.3.5.
POJOs
5.3.6.
Lazy fetching
5.3.7.
Many fetching
5.3.8.
Later fetching
5.3.9.
ResultSet fetching
5.3.10.
Data type conversion
5.4.
Static statements vs. Prepared Statements
5.5.
Reusing a Query's PreparedStatement
5.6.
Using JDBC batch operations
5.7.
Sequence execution
5.8.
Stored procedures and functions
5.8.1.
Oracle Packages
5.8.2.
Oracle member procedures
5.9.
Exporting to XML, CSV, JSON, HTML, Text
5.9.1.
Exporting XML
5.9.2.
Exporting CSV
5.9.3.
Exporting JSON
5.9.4.
Exporting HTML
5.9.5.
Exporting Text
5.10.
Importing data
5.10.1.
Importing CSV
5.10.2.
Importing XML
5.11.
CRUD with UpdatableRecords
5.11.1.
Simple CRUD
5.11.2.
IDENTITY values
5.11.3.
Navigation methods
5.11.4.
Non-updatable records
5.11.5.
Optimistic locking
5.11.6.
Batch execution
5.12.
DAOs
5.13.
Exception handling
5.14.
ExecuteListeners
5.15.
Logging
5.16.
Performance considerations
6.
Code generation
6.1.
Configuration and setup of the generator
6.2.
Advanced generator configuration
6.3.
Generated global artefacts
6.4.
Generated tables
6.5.
Generated records
6.6.
Generated POJOs
6.7.
Generated Interfaces
6.8.
Generated DAOs
6.9.
Generated sequences
6.10.
Generated procedures
6.11.
Generated UDTs
6.12.
Master data and enumeration tables
6.13.
Custom data types and type conversion
6.14.
Mapping generated schemata and tables
7.
Tools
7.1.
jOOQ Console
8.
Reference
8.1.
Supported RDBMS
8.2.
Data types
8.2.1.
BLOBs and CLOBs
8.2.2.
Unsigned integer types
8.2.3.
INTERVAL data types
8.2.4.
XML data types
8.2.5.
Geospacial data types
8.2.6.
CURSOR data types
8.2.7.
ARRAY and TABLE data types
8.3.
jOOQ's BNF pseudo-notation
8.4.
Credits

The jOOQ User Manual. Multiple Pagesprevious : next
The jOOQ Logo