Share jOOQ on Facebook
Share jOOQ on Twitter
The jOOQ User Manual. Multiple Pagesprevious : next

This page in other versions: 3.4 | 3.3 | 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 through the query DSL and the query model API. 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's JDBC mocking feature

  • 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 and Apache DBCP
3.4.4.
Using jOOQ with Flyway
3.4.5.
Using jOOQ with JAX-RS
3.4.6.
A simple web application with jOOQ
3.5.
jOOQ and Java 8
3.6.
jOOQ and Scala
3.7.
jOOQ and Groovy
3.8.
Dependencies
3.9.
Build your own
3.10.
jOOQ and backwards-compatibility
4.
SQL building
4.1.
The query DSL type
4.1.1.
DSL subclasses
4.2.
The DSLContext class
4.2.1.
SQL Dialect
4.2.2.
SQL Dialect Family
4.2.3.
Connection vs. DataSource
4.2.4.
Custom data
4.2.5.
Custom ExecuteListeners
4.2.6.
Custom Settings
4.2.7.
Runtime schema and table mapping
4.3.
SQL Statements (DML)
4.3.1.
jOOQ's DSL and model API
4.3.2.
The WITH clause
4.3.3.
The SELECT statement
4.3.3.1.
The SELECT clause
4.3.3.2.
The FROM clause
4.3.3.3.
The JOIN clause
4.3.3.4.
The WHERE clause
4.3.3.5.
The CONNECT BY clause
4.3.3.6.
The GROUP BY clause
4.3.3.7.
The HAVING clause
4.3.3.8.
The WINDOW clause
4.3.3.9.
The ORDER BY clause
4.3.3.10.
The LIMIT .. OFFSET clause
4.3.3.11.
The SEEK clause
4.3.3.12.
The FOR UPDATE clause
4.3.3.13.
UNION, INTERSECTION and EXCEPT
4.3.3.14.
Oracle-style hints
4.3.3.15.
Lexical and logical SELECT clause order
4.3.4.
The INSERT statement
4.3.5.
The UPDATE statement
4.3.6.
The DELETE statement
4.3.7.
The MERGE statement
4.4.
SQL Statements (DDL)
4.4.1.
The TRUNCATE statement
4.4.2.
The ALTER statement
4.4.3.
The DROP statement
4.5.
Table expressions
4.5.1.
Generated Tables
4.5.2.
Aliased Tables
4.5.3.
Joined tables
4.5.4.
The VALUES() table constructor
4.5.5.
Nested SELECTs
4.5.6.
The Oracle 11g PIVOT clause
4.5.7.
jOOQ's relational division syntax
4.5.8.
Array and cursor unnesting
4.5.9.
The DUAL table
4.6.
Column expressions
4.6.1.
Table columns
4.6.2.
Aliased columns
4.6.3.
Cast expressions
4.6.4.
Datatype coercions
4.6.5.
Arithmetic expressions
4.6.6.
String concatenation
4.6.7.
General functions
4.6.8.
Numeric functions
4.6.9.
Bitwise functions
4.6.10.
String functions
4.6.11.
Date and time functions
4.6.12.
System functions
4.6.13.
Aggregate functions
4.6.14.
Window functions
4.6.15.
Grouping functions
4.6.16.
User-defined functions
4.6.17.
User-defined aggregate functions
4.6.18.
The CASE expression
4.6.19.
Sequences and serials
4.6.20.
Tuples or row value expressions
4.7.
Conditional expressions
4.7.1.
Condition building
4.7.2.
AND, OR, NOT boolean operators
4.7.3.
Comparison predicate
4.7.4.
Boolean operator precedence
4.7.5.
Comparison predicate (degree > 1)
4.7.6.
Quantified comparison predicate
4.7.7.
NULL predicate
4.7.8.
NULL predicate (degree > 1)
4.7.9.
DISTINCT predicate
4.7.10.
BETWEEN predicate
4.7.11.
BETWEEN predicate (degree > 1)
4.7.12.
LIKE predicate
4.7.13.
IN predicate
4.7.14.
IN predicate (degree > 1)
4.7.15.
EXISTS predicate
4.7.16.
OVERLAPS predicate
4.8.
Plain SQL
4.9.
Names and identifiers
4.10.
Bind values and parameters
4.10.1.
Indexed parameters
4.10.2.
Named parameters
4.10.3.
Inlined parameters
4.10.4.
SQL injection and plain SQL QueryParts
4.11.
QueryParts
4.11.1.
SQL rendering
4.11.2.
Pretty printing SQL
4.11.3.
Variable binding
4.11.4.
Extend jOOQ with custom types
4.11.5.
Plain SQL QueryParts
4.11.6.
Serializability
4.11.7.
Custom SQL transformation
4.11.7.1.
Logging abbreviated bind values
4.12.
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.
Record1 to Record22
5.3.3.
Arrays, Maps and Lists
5.3.4.
RecordHandler
5.3.5.
RecordMapper
5.3.6.
POJOs
5.3.7.
POJOs with RecordMappers
5.3.8.
Lazy fetching
5.3.9.
Many fetching
5.3.10.
Later fetching
5.3.11.
ResultSet fetching
5.3.12.
Data type conversion
5.3.13.
Interning data
5.4.
Static statements vs. Prepared Statements
5.5.
Reusing a Query's PreparedStatement
5.6.
JDBC flags
5.7.
Using JDBC batch operations
5.8.
Sequence execution
5.9.
Stored procedures and functions
5.9.1.
Oracle Packages
5.9.2.
Oracle member procedures
5.10.
Exporting to XML, CSV, JSON, HTML, Text
5.10.1.
Exporting XML
5.10.2.
Exporting CSV
5.10.3.
Exporting JSON
5.10.4.
Exporting HTML
5.10.5.
Exporting Text
5.11.
Importing data
5.11.1.
Importing CSV
5.11.2.
Importing XML
5.12.
CRUD with UpdatableRecords
5.12.1.
Simple CRUD
5.12.2.
Records' internal flags
5.12.3.
IDENTITY values
5.12.4.
Navigation methods
5.12.5.
Non-updatable records
5.12.6.
Optimistic locking
5.12.7.
Batch execution
5.12.8.
CRUD SPI: RecordListener
5.13.
DAOs
5.14.
Transaction management
5.15.
Exception handling
5.16.
ExecuteListeners
5.17.
Database meta data
5.18.
Logging
5.19.
Performance considerations
6.
Code generation
6.1.
Configuration and setup of the generator
6.2.
Advanced generator configuration
6.3.
Programmatic generator configuration
6.4.
Custom generator strategies
6.5.
Matcher strategies
6.6.
Custom code sections
6.7.
Generated global artefacts
6.8.
Generated tables
6.9.
Generated records
6.10.
Generated POJOs
6.11.
Generated Interfaces
6.12.
Generated DAOs
6.13.
Generated sequences
6.14.
Generated procedures
6.15.
Generated UDTs
6.16.
Data type rewrites
6.17.
Custom data types and type conversion
6.18.
Mapping generated schemata and tables
6.19.
Code generation for large schemas
7.
Tools
7.1.
JDBC mocking for unit testing
7.2.
SQL 2 jOOQ Parser
7.3.
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.
SQL to DSL mapping rules
8.4.
jOOQ's BNF pseudo-notation
8.5.
Quality Assurance
8.6.
Migrating to jOOQ 3.0
8.7.
Credits

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