GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - javaquasar/j4db: Type-safe JDBC mapper and Column Enum generator for Spring Boot. Eliminates boilerplate with compile-time safe queries and stored procedure calls using Java enums. Built for Java 21+ with first-class PostgreSQL support.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
gradle
gradle
 
 
j4db-core
j4db-core
 
 
j4db-generator
j4db-generator
 
 
j4db-spring-boot3-starter
j4db-spring-boot3-starter
 
 
j4db-spring-boot4-starter
j4db-spring-boot4-starter
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

J4DB — Type-Safe Spring JDBC Mapper & Column Enum Generator

Java Spring Boot License

J4DB is a modern, lightweight, and fully type-safe JDBC abstraction layer for Spring Boot applications.

It automatically generates column enums from your database tables and provides a clean, fluent API for both raw and fully compile-time safe queries, as well as type-safe stored procedure calls.

✨ Key Features

  • Automatic generation of type-safe XXXColumns enums implementing ColumnMeta
  • Two powerful query APIs:
    • RawQuery — simple and flexible
    • TypedQuery — fully compile-time safe using QueryIn enums
  • Type-safe stored procedure support (EnumBasedStoredProc, ProcIn / ProcOut)
  • Excellent PostgreSQL support (UUID, JSONB, arrays, INET, etc.)
  • Multi-database support via DatabaseDialect + DialectRegistry
  • First-class support for Java Records (immutable entities)
  • Lightweight core with minimal dependencies
  • Spring Boot Starter with auto-configuration
  • Ready for code generator

📦 Project Modules

Module Artifact ID Status Description
j4db-core j4db-core ✅ Stable Core runtime library
j4db-generator j4db-generator 🔄 In progress Code generation engine
j4db-spring-boot3-starter j4db-spring-boot3-starter ✅ Ready Main starter for Spring Boot 3.x
j4db-spring-boot4-starter j4db-spring-boot4-starter 🔄 Planned Future starter for Spring Boot 4.x

🚀 Quick Start

1. Add dependency (Maven)

<dependency>
    <groupId>io.github.javaquasar</groupId>
    <artifactId>j4db-spring-boot3-starter</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

Gradle

implementation 'io.github.javaquasar:j4db-spring-boot3-starter:1.0.0-SNAPSHOT'

2. Configure in application.yml

j4db:
  dialect: postgresql
  default-schema: public

3. Usage Example

@Service
@RequiredArgsConstructor
public class UserService {

    private final J4dbContext j4db;

    public List<User> findActiveUsers() {
        return j4db.query(UserRowMapper.class)
                .sql("SELECT * FROM users WHERE is_active = ?")
                .param(true)
                .executeList();
    }

    public User findById(Long id) {
        return j4db.typedQuery(UserRowMapper.class)
                .sql("SELECT * FROM users WHERE id = :userId")
                .param(UserQueryParams.USER_ID, id)
                .executeOneOrThrow();
    }
}

Philosophy

"Write SQL. Stay type-safe."

J4DB sits between raw JDBC and heavy ORMs — giving you full control over SQL while eliminating boilerplate mapping and stringly-typed parameters.

Roadmap

  • Core runtime and EnumBasedRowMapper
  • Raw & Typed Query API
  • Stored Procedure support
  • Code generator (tables → Columns enum + Mapper)
  • Full Spring Boot auto-configuration
  • Gradle & Maven plugins

License

This project is licensed under the Apache License 2.0 — see the LICENSE file for details.


Built with ❤️ for clean and maintainable Java backend development. Questions, suggestions, or contributions are welcome! Feel free to open an issue or pull request.

About

Type-safe JDBC mapper and Column Enum generator for Spring Boot. Eliminates boilerplate with compile-time safe queries and stored procedure calls using Java enums. Built for Java 21+ with first-class PostgreSQL support.

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.