Skip to content

albertattard/fluent-jdbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluent JDBC Library

A reflection less library for fluent JDBC calls.

Following is a basic example.

final DataSource dataSource = ...;
final FluentConnection connection = FluentConnection.of(dataSource);

connection
  .preparedStatement("INSERT INTO name (id, name, surname, email_address) VALUES (?,?,?,?)")
  .withParameters(preparedStatement -> {
    int index=1;
    preparedStatement.setLong(index++,1);
    preparedStatement.setString(index++,"Albert");
    preparedStatement.setString(index++,"Attard");
    preparedStatement.setString(index,"albertattard@gmail.com");
  })
  .executeUpdate();

final long count = connection
        .statement("SELECT COUNT(*) FROM name")
        .singleLong();

assertEquals(1, count);

About

Fluent JDBC Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages