Beginning jOOQ - Learn to Write Efficient and Effective Java-Based SQL Database Operations

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Learn to use the jOOQ library to manage SQL database operations in Java and JVM applications. This book walks you through what JOOQ is, how to install and get started with it, and then gets you working with it. ------------------- Practical examples and case studies demonstrate how jOOQ offers a more efficient and versatile alternative to Object-Relational Mapping frameworks like Hibernate and JPA, while providing a natural, native-SQL feeling for the developer. You'll see how to maximize the full potential of your SQL database with advanced query syntax and functions with this lightweight, SQL-friendly framework. Come see how you can use high performance approaches like reactive, data streaming and cloud-native programming to get data from SQL tables. ------------------------- Never write another incorrect SQL statement again and protect your application from SQL injection with the strong typing and inbuilt controls in jOOQ. Learn how to add jOOQ to your existing Hibernate, Spring Boot or Quarkus applications. ---------------------- When you’ve completed this book, you will be able to take the knowledge you’ve gained, along with the freely available source code, and directly apply them to your own work. ---------------------- What You Will Learn Comparing equivalent features between Hibernate, JPA and jOOQ Unlock the power of your SQL database with high performing, flexible and typesafe SQL queries Seamlessly work with many different SQL database vendors without changing your code Effortlessly generate Java code based on the content of your database Write reactive SQL database access code with R2DBC Integrating jOOQ into popular frameworks and platforms like Hibernate, Spring boot and Quarkus tools like IDEs Testing jOOQ-based code with modern integration testing frameworks like TestContainers and Docker Learn how to safely handle data access code within frameworks like the Java Persistence API (JPA) -------------------------------- ayo Koleoso is the Founder and CEO of LettuceWork, the world's first platform dedicated to engineering culture. He created the Better Managed Development method for building and sustaining an effective product engineering culture. He's a lifelong learner, engineer and engineering leader committed to building people and software in a healthy, sustainable and effective ecosystem. He absolutely sucks at everything else. He got his start in software engineering as a teenage database programmer with Oracle 8i. The jOOQ platform is therefore a natural fit and a return to his roots: his love affair with SQL.

Author(s): Tayo Koleoso
Edition: 1
Publisher: Apress
Year: 2022

Language: English
Pages: 228
Tags: java jdk sql mysql eclipse dbms oracle spring boot quarkus

Table of Contents
About the Author
About the Technical Reviewer
Chapter 1: Welcome to jOOQ
Database Operations in Java: The Good Parts
Database Operations in Java: The…Not So Good Parts
You Have Got to Be jOOQing
jOOQ Feature Tour
Database Aware
Code Generation
Type Safety
Domain-Specific Language
Tooling Support
JVM Languages
Chapter 2: Getting Started with jOOQ
Eden Auto Mart
Setting Up jOOQ
Install Dependencies for Commercial-Licensed jOOQ
CRUD with jOOQ
Your SQL Dialect and You
Tools of CRUD in jOOQ
Select Statements
The SELECT DSL
With the WHERE DSL
Conditions
Subqueries
Conditional Logic in Queries
With the… WITH Clause
With the GROUP BY DSL
With the HAVING DSL
With the ORDER BY DSL
ORDER BY CASE
ORDER BY NULL
Paginate Query Results
Insert Statements
With Multiple Rows
With Sequences
With Select
Update Statements
Delete Statements
Tuple Syntax
Alternative Data Access Modes
Streaming Access
Lazy Access
Transactions
With Locking
Configuration
Connection Management
Schema, Catalog, and Multi-tenant Deployment
Query Management
Query Lifecycle Integration
Chapter 3: Working with jOOQ
Generating Code
Tools of jOOQ Code Generation
Configure jOOQ for Code Generation
Generate Code with Maven
Generate Code from the Command Line
Generate Code Programmatically
Results of Code Generation
Tables
Global Artifacts
Add Custom Code to Generated Code
Working with Generated Code
CRUD with Generated Code
Enhancements from UpdatableRecord
Formatting
Optimistic Locking
Advanced Database Operations
Joins
Non-SQL Grouping
Batch Operations
Explicit Batching
Batch Import
Advanced Query Syntax
Merge and Upsert
Window Functions
Chapter 4: Integrating with jOOQ
Java Persistence API with jOOQ
Generate JPA Entities
Generate from JPA Entities
Generate SQL Queries
Spring Boot and jOOQ
Configure jOOQ in Spring Boot
With Custom SQL
jOOQ Spring Boot Starter
Quarkus and jOOQ
Chapter 5: Packaging and Testing jOOQ
Package Code with jOOQ
When You Don’t Need Code Generation
When You Don’t Have an Active Database Connection
When Your Schema Needs to Incrementally Evolve
Recipe for a Self-Sufficient Database Project
Testing with jOOQ
Tools of the (SQL) Testing Trade
Unit Testing with jOOQ
Using Mockito
With SQL Parsing
Integration Testing with Docker and TestContainers
With Spring Boot
Index