Skip to content

1.0.0

Choose a tag to compare

@ez-plugins ez-plugins released this 15 Apr 14:39
· 98 commits to main since this release
8bba049

Highlights

  • Fluent, type-safe builder API for constructing SQL SELECT queries in Java
  • Parameterized SQL generation: All queries use ? placeholders and separate parameter lists, ensuring safety from SQL injection
  • Comprehensive operator support: =, !=, >, <, LIKE, IN, BETWEEN, IS NOT NULL, and more
  • Column selection, grouping, sorting, and pagination: Easily specify columns, GROUP BY, ORDER BY, LIMIT, and OFFSET
  • Multiple SQL dialects: Built-in support for Standard SQL and SQLite, with automatic identifier quoting and boolean handling
  • In-memory filtering: Use the same query objects to filter Java collections via the QueryableStorage interface
  • No runtime dependencies: Pure Java 21 library

Example Usage

SqlResult result = new QueryBuilder()
    .select("id", "name")
    .whereEquals("status", "active")
    .orderBy("name", true)
    .limit(10)
    .buildSql("users");

Architecture

  • Fluent builders for SELECT, INSERT, UPDATE, DELETE
  • Immutable Query objects
  • Pluggable SQL dialects
  • Full Javadoc and Checkstyle compliance