JdbcTemplate NG

A new take on JdbcTemplate.

License

License

MIT
GroupId

GroupId

com.github.marschall
ArtifactId

ArtifactId

jdbctemplate-ng
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

JdbcTemplate NG
A new take on JdbcTemplate.
Project URL

Project URL

https://github.com/marschall/jdbctemplate-ng
Source Code Management

Source Code Management

https://github.com/marschall/jdbctemplate-ng

Download jdbctemplate-ng

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.marschall/jdbctemplate-ng/ -->
<dependency>
    <groupId>com.github.marschall</groupId>
    <artifactId>jdbctemplate-ng</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.marschall/jdbctemplate-ng/
implementation 'com.github.marschall:jdbctemplate-ng:0.1.0'
// https://jarcasting.com/artifacts/com.github.marschall/jdbctemplate-ng/
implementation ("com.github.marschall:jdbctemplate-ng:0.1.0")
'com.github.marschall:jdbctemplate-ng:jar:0.1.0'
<dependency org="com.github.marschall" name="jdbctemplate-ng" rev="0.1.0">
  <artifact name="jdbctemplate-ng" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.marschall', module='jdbctemplate-ng', version='0.1.0')
)
libraryDependencies += "com.github.marschall" % "jdbctemplate-ng" % "0.1.0"
[com.github.marschall/jdbctemplate-ng "0.1.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.springframework : spring-core Optional jar 5.0.4.RELEASE
org.springframework : spring-jdbc Optional jar 5.0.4.RELEASE
org.springframework : spring-tx Optional jar 5.0.4.RELEASE

test (19)

Group / Artifact Type Version
org.springframework : spring-context jar 5.0.4.RELEASE
org.springframework : spring-test jar 5.0.4.RELEASE
com.h2database : h2 jar 1.4.197
org.hsqldb : hsqldb jar 2.4.0
org.apache.derby : derby jar 10.14.1.0
org.firebirdsql.jdbc : jaybird-jdk18 jar 3.0.1
org.mockito : mockito-core jar 2.8.47
org.postgresql : postgresql jar 42.1.4
mysql : mysql-connector-java jar 6.0.6
org.mariadb.jdbc : mariadb-java-client jar 2.1.0
org.junit.jupiter : junit-jupiter-api jar 5.1.0
org.junit.jupiter : junit-jupiter-params jar 5.1.0
org.junit.jupiter : junit-jupiter-engine jar 5.1.0
org.junit.platform : junit-platform-launcher jar 1.1.0
com.microsoft.sqlserver : mssql-jdbc jar 6.3.0.jre8-preview
org.assertj : assertj-core jar 3.9.1
org.apache.logging.log4j : log4j-core jar 2.11.0
org.apache.logging.log4j : log4j-slf4j-impl jar 2.11.0
org.apache.logging.log4j : log4j-jcl jar 2.11.0

Project Modules

There are no modules declared in this project.

JdbcTemplateNg

A new take on JdbcTemplate.

This project has the following goals:

  • support Optional
  • reduce the number of methods on JdbcOperations
  • native support named parameters (Oracle, IBM DB2)

additional features:

  • more control over return type by use of a collector
  • statement customizer allows to set fetch size without having to create a prepared statement creator
  • large update support

non-goals

features not supported:

  • java.util.Date <-> java.sql.Timestamp and java.util.Calendar <-> java.sql.Timestamp type conversions, use JSR-310 datatypes
  • work around JDBC driver bugs
  • consider JDBC metadata
  • jdbc type support
  • rownum in RowMapper
  • stored procedures

TODO

  • tests for failed updates
  • unprepared statement for statements without bind parameters

???

  • naming: query().collectTo...

  • naming: update().for...

  • naming: batchUpdate().forGeneratedKeysAndFailedUpdates is bad, something with generated keys and callback

  • naming: JdbcTemplate.(batch)UpdateForGeneratedKeys()

  • should #binding support a collection as an argument, especially for batch updates

  • case insensitive map, map contract, keySet, equals contract

  • should binding happen at the end so that operations can be cached? PreparedStatementSetter would have to take arguments

Versions

Version
0.1.0