JDBI v3.5.1 Release Notes

  • 🚀 (whoops, 3.5.0 was released from the wrong commit!)

    • 🆕 New API
      • SqlStatements.allowUnusedBindings allows you to bind Arguments to query parts that may be left out of the final query (e.g. by a TemplateEngine that renders conditional blocks) without getting an Exception.
      • Added the MapMappers JdbiConfig class to configure column name case changes, preferred over the old boolean toggle.
      • ColumnNameMatcher.columnNameStartsWith() method, used by reflection mappers to short-circuit nested mappings when no columns start with the nested prefix.
      • bindMethodsList and @BindMethodsList create VALUES(...) tuples by calling named methods
    • 👌 Improvements
      • SqlObject no longer transforms non-Runtime exceptions (slightly breaking change)
      • Use MethodHandles over Reflection to additionally do less exception wrapping / transformation
      • Skip unused string formatting for performance
      • Spring FactoryBean better singleton support
      • KotlinMapper respects constructor annotations, lateinit improvements
      • Behavioral fixes in Argument binding where the number of provided Arguments differs from the expected number.
      • Optional mapping of @Nested objects when using BeanMapper, ConstructorMapper, FieldMapper, or KotlinMapper. @Nested objects are only mapped when the result set contains columns that match the nested object.
      • ConstructorMapper allows constructor parameters annotated @Nullable to be missing from the result set. Any annotation named "Nullable" from any package may be used.
      • jdbi3-testing artifact has pg dependencies marked as optional, in case you e.g. only want h2 or oracle
      • LocalTransactionHandler: rollback on thrown Throwable
      • test on openjdk11
      • EnumSet mapping support