Releases: jdbi/jdbi
JDBI 3.40.0
3.40.0
Starting with this release, Jdbi requires JDK 11 or better! Older JDK versions are no longer supported
- add extension point to decorate withHandle and friends (#2448)
- fix
PreparedBatch
c'tor problem where the binding context was not set correctly. (#2404) - Slight memory optimization on RowMappers and ColumnMappers findFor (#2418)
- JsonMapper implementations now bind the Type earlier, which saves work in Jackson and Gson (#2420)
- performance improvements for all ExtensionConfigurer implementations (#2416, #2424)
- Remove JSR 305 annotations from the Jdbi codebase, one small step closer to JPMS. (#2408)
- remove unnecessary tests before adding standard methods to extension objects (#2414)
- Update h2 to 2.2.220 (#2428)
- various small performance improvements (#2436, #2437, #2440)
- improve generator performance (#2439)
JDBI 3.39.1
3.39.x is the last release of Jdbi to support Java 8. Java 8 is obsolete for a long time and the burden of supporting it in Jdbi has grown as parts of our tool chain and libraries no longer support it. We intend to do occasional bug patches for significant bugs or security issues but there will be no further active development work.
-
add
Extensions#failFast()
to enable extension objects with misconfigured methods to fail at first access. Default is to fail when a misconfigured method is accessed for the first time. -
add new
@RegisterCollector
customizing annotation (#2377) -
correctly return null for OutParameters when the called procedure returns NULL.
-
promoted from
@Beta
to stable (no functional changes, some minor doc reformatting and additions)JdbiProperty
,DatabaseValue
,PropagateNull
,GenerateSqlObject
annotationsNamedArgumentFinder
,SetObjectArgumentFactory
,GetObjectColumnMapperFactory
,GenericMapMapperFactory
,RowViewMapper
MapMappers
configuration objectConfigCache
functionalitySqlStatementCustomizer#warm()
andSqlStatementParameterCustomizer#warm()
- template engines
- moshi json support
-
promoted from
@Alpha
to@Beta
(no functional changes, doc cleanups)- Codec functionality
BaseStatement#attachToHandleForCleanup()
- PostGIS support
JDBI 3.39.0
Do not use. - Prefer 3.39.1
- add
Extensions#failFast()
to enable extension objects with misconfigured methods to fail at first access. Default is to fail when a misconfigured method is accessed for the first time. - add new
@RegisterCollector
customizing annotation (#2377)
Jdbi v3.38.3
3.38.3
- allow unknown result mappers during
ResultReturner
warmup. This restores the pre-3.38.0 behavior
where SQLObject classes with invalid methods could be used unless a method is explicitly called (#2342) - document vavr incompatibility between 0.10.x and 1.0.0-alpha (#2350)
- Handle.inTransaction: improve exception thrown when restoring transaction isolation #2343
- add support for Guice 6.x (using javax.inject annotations) and guice 7.x (using jakarta.inject annotations)
jdbi v3.38.2
- spring5 JdbiUtil: fix thread safety #2341
3.38.1
Performance improvements: creating statements rapidly should no longer create nearly as much garbage to collect, and spend a lot less time copying hash maps.
JDBI 3.38.0
With three RCs and over 15,000 lines of changed code, 3.38.0 turned out to be a massive release:
Large refactorings
- rewrite the core extension framework, move functionality from sqlobject to core
- rewrite sqlobject and the generator to use the new extension framework, deprecate functionality that moved to the core
Bug fixes
- fix
GenericType
creation in parameterized classes (#2305) - fix problem when using the jdbi bom in spring projects (#2295, thanks @jedvardsson)
- StringTemplate engine: handle st4 errors rather than logging to stderr. Allow configuring missing attribute as a fatal error
Improvements and new functionality
- add
SqlStatements#setAttachAllStatementsForCleanup
. Setting this configuration flag will attach all created statements to their handles for resource cleanup. Default isfalse
. (#2293, thanks @jodastephen) - add
SqlStatements#setAttachCallbackStatementsForCleanup
. Setting this configuration flag will attach all created statements within one of theJdbi
callback methods to the handle. This allows code that uses theJdbi
callback methods to delegate resource management fully to Jdbi. This flag is set by default. (#2293, thanks @jodastephen) - add
JdbiExecutor
for async Jdbi operations (#2280, thanks @leblonk) - ResultIterable methods:
set()
,collectToMap()
,toCollection()
,collectInto()
,collectIntoList()
,collectIntoSet()
(#2262, thanks @gpsfl) - Support Consumer<Iterable> as a consumer argument for operations that return multiple results.
Small changes
CaseStrategy
is now an official API (dropped @beta) (#2309)- rewrite
AccessibleObjectStrategy
into an enum (#2310) - allow user defined functions for message rendering (#2311)
- Helpers to make registering CollectorFactory easier
- FreemarkerEngine encourages singleton use so caching works better
Dependencies
- StringTemplate 4.3.4
- update spring framework dependency to 5.3.27 (address CVE-2023-20861, CVE-2023-20863)
JDBI 3.38.0-rc1
This is the first release candidate for JDBI 3.38.0
There are major changes to the extension framework and its major implementations (sqlobject and generator). While the code passes our test suite, this code may expose unexpected problems or hidden bugs. It should be used in production environments with caution.
Depending on the feedback / bug reports we may add another release candidate. Final release will depend on wrapping up documentation for the new extension framework as well.
Changes
- add
SqlStatements#setAttachAllStatementsForCleanup
. Setting this configuration flag will attach all created statements to their handles for resource cleanup. Default isfalse
. (#2293, thanks @jodastephen) - add
SqlStatements#setAttachCallbackStatementsForCleanup
. Setting this configuration flag will attach all created statements within one of theJdbi
callback methods to the handle. This allows code that uses theJdbi
callback methods to delegate resource management fully to Jdbi. This flag is set by default. (#2293, thanks @jodastephen) - fix problem when using the jdbi bom in spring projects (#2295, thanks @jedvardsson)
- add
JdbiExecutor
for async Jdbi operations (#2280, thanks @leblonk) - rewrite the core extension framework, move functionality from sqlobject to core
- rewrite sqlobject and the generator to use the new extension framework, deprecate functionality that moved to the core
JDBI 3.37.1
If you are using 3.37.0, please upgrade to this version. The bug below only affects 3.37.0
- fix deadlock in default Jdbi cache (#2274)
JDBI 3.37.0
DO NOT USE
The default cache contains a thread deadlock when the cache is evicting while adding new entries through multiple threads. This has been fixed in 3.37.1 (#2274)
- upgrade to geantyref 1.3.14
- removes the core dependency on the caffeine library. This now uses a simple LRU cache for sql parser and sql statements.
- adds pluggable cache implementation using caffeine. The old caching behavior can now be restored by using the
jdbi3-caffeine-cache
dependency and addingjdbi.installPlugin(new CaffeineCachePlugin());
. - adds pluggable no-op cache implementation for testing and debugging
- improve PostGIS null value handling (#2260, thanks @tprebs)
- use Postgres 15 (native arm64) for building on MacOS arm64