What are some more options or good practices for dynamic SQL query building?

This page summarizes the projects mentioned and recommended in the original post on /r/java

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • honeysql

    Turn Clojure data structures into SQL

  • JDBI

    The Jdbi library provides convenient, idiomatic access to relational databases in Java and other JVM technologies such as Kotlin, Clojure or Scala.

  • I really like JDBI. It’s thin enough that it lets you do anything SQL can do, but opinionated enough to provide a sane, sturdy, structured approach to working with a database.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • sequel

    Sequel: a Java query builder (by henryx)

  • Time ago, I've started the build of my own query builder, which covers cases like your. Query result is generated in programmatic way and the initial intention was oi use with JDBI . If you want to look it, code is in https://github.com/henryx/sequel

  • ormlite

    ORMLite Android functionality used in conjunction with ormlite-core

  • I liked this one https://ormlite.com/

  • spring-data-relational

    Spring Data Relational. Home of Spring Data JDBC and Spring Data R2DBC.

  • I would ignore the hipster jOOQ and similar and start with Spring Data JDBC https://spring.io/projects/spring-data-jdbc

  • ElSql

    Manage external SQL files in Java with a little DSL goodness

  • You could use https://github.com/OpenGamma/ElSql for this. It's compatible with NamedParameterJdbcTemplate and allows for enough dynamism to solve common problems without rewriting your entire query.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts