Skip to content

amalrajvinoth/jooq-optimistic-locking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jOOQ Optimistic Locking

This repository demonstrates the integration of jOOQ's powerful querying capabilities , specifically focusing on implementing optimistic locking strategies. The goal is to showcase how to leverage jOOQ's expressive DSL for building type-safe SQL queries for building enterprise Java applications to implement efficient optimistic locking mechanisms.

Key Features

  • Seamless integration of jOOQ for efficient database operations
  • Implementation of optimistic locking strategies to manage concurrent data access
  • Detailed examples and best practices for incorporating jOOQ
  • Comprehensive documentation and code samples for easy understanding and implementation

Installation

  1. Clone the repository: git clone https://github.com/amalrajvinoth/jooq-optimistic-locking.git
  2. DB Migrations
    1. To first clean the database and then run all the migrations, run the following command:
    ./mvnw -f pom.xml flyway:clean flyway:migrate  \
      -Djooq.skip.generation=true \
      -DDATASOURCE_HOST=127.0.0.1 \
      -DDATASOURCE_PORT=5432 \
      -DDATASOURCE_USER=postgres \
      -DDATASOURCE_DATABASE_NAME=postgres \
      -DDATASOURCE_PASSWORD=password
  3. Generate jOOq classes
    $ ./mvnw -f pom.xml jooq-codegen:generate  \
    -Djooq.skip.generation=false \
    -DDATASOURCE_HOST=127.0.0.1 \
    -DDATASOURCE_PORT=5432 \
    -DDATASOURCE_USER=postgres \
    -DDATASOURCE_DATABASE_NAME=postgres \
    -DDATASOURCE_PASSWORD=password
  4. Run Main
     mvn compile exec:java -Dexec.mainClass="io.github.amalrajvinoth.Main" -DDB_PASSWORD=pzS5dRWDUc7bu8Kr -DDB_URL="jdbc:postgresql://127.0.0.1:54320/test" -DDB_USER=postgres

Usage

Follow the guidelines in the usage documentation to understand how to use the jOOQ with optimistic locking.

About

jOOQ Optimistic Locking with Spring & standalone

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages