Skip to content

About

A modern Java query builder with SQL generation

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

JavaQueryBuilder

JitPack GitHub Packages codecov

A lightweight, fluent Java library for building parameterized SQL queries and filtering in-memory data, no runtime dependencies required.

Features

  • Fluent, readable builder API for SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE
  • All values are parameterized, safe from SQL injection by design
  • Supports all common operators: =, !=, >, >=, <, <=, LIKE, NOT LIKE, IN, NOT IN, BETWEEN, IS NULL, IS NOT NULL
  • Subquery support: WHERE col IN (SELECT ...), WHERE EXISTS (SELECT ...), WHERE NOT EXISTS, derived-table FROM (SELECT ...) AS alias, JOIN subqueries, and scalar (SELECT ...) AS alias in SELECT
  • Column selection, DISTINCT, GROUP BY, ORDER BY, LIMIT, and OFFSET
  • SQL dialect support: Standard, MySQL, SQLite
  • Global and per-query configuration of defaults (e.g., dialect, columns, limit, LIKE wrapping) via QueryBuilderDefaults
  • In-memory filtering via QueryableStorage
  • Zero runtime dependencies, pure Java 17+

Installation

Add the dependency to your pom.xml:

<dependency>
    <groupId>com.github.EzFramework</groupId>
    <artifactId>JavaQueryBuilder</artifactId>
    <version>1.0.5</version>
</dependency>

Add the repository of Jitpack to your pom.xml:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Quick Start