Skip to content

Motivation

Zsolt Herpai edited this page Feb 20, 2015 · 18 revisions

####Motivation#### FluentJdbc provides a fluent API for executing native SQL queries in java. It is best suited for projects that require fine control over SQL queries and operations in a convenient, declarative way. Can be used standalone or complement higher level abstractions like JPA or others.

It provides features like: support for custom parameter types (like java.time), named query parameters, automatic ResultSet to POJO mapping, etc. It also avoids inconveniences of JDBC API, like: checked exceptions, explicit resource management / leaks, clutter. FluentJdbc is light-weight, has no 3rd party dependencies.

#####Main advantages over plain JDBC#####

  • a flexible, functional API making the most common JDBC operations trivial one-liners
  • implicit resource management, avoiding leaks of Connections, PreparedStatements, ResultSets
  • out of the box support for java.time, extension API for more custom types
  • automatic mapping of results to POJOs
  • named query parameters
<dependency>
    <groupId>org.codejargon</groupId>
    <artifactId>fluentjdbc</artifactId>
    <version>0.9.2</version>
</dependency>

Get started guide
Javadoc