All Versions
162
Latest Version
Avg Release Cycle
27 days
Latest Release
-

Changelog History
Page 5

  • v3.8.1 Changes

    • ๐Ÿ›  Bugfixes
      • provide SqlBatch statement customizers with non-null Statement
  • v3.8.0 Changes

    • ๐Ÿ†• New Features
      • RowViewMapper lets you use higher level RowView in a RowMapper.
      • ResultIterable.first() returns the first row. Throws an exception if there are zero rows.
      • ResultIterable.one() returns the only row. Throws an exception if there are zero or multiple rows.
      • ResultIterable.findOne() returns an Optional<T> of the only row, or Optional.empty() if there are zero rows, or the only row is null. Throws an exception if there are multiple rows.
    • ๐Ÿ—„ Deprecated API
      • ResultIterable.findOnly() is deprecated, in favor of the new method ResultIterable.one().
  • v3.7.1 Changes

    • ๐Ÿ†• New Features
      • Initial Java Module System support via Automatic-Module-Name
    • ๐Ÿ‘Œ Improvements
      • Postgres JDBC driver is now provided to avoid fighting with servlet containers.
  • v3.7.0 Changes

    • ๐Ÿ†• New Features
      • @AllowUnusedBindings SqlObject customizer, like SqlStatements.setUnusedBindingsAllowed
      • Enums config class to change the default policy for binding and mapping Enum values.
      • @UseEnumStrategy SqlObject configurer for setting the default enum strategy.
      • @EnumByName and @EnumByOrdinal qualifying annotations to override said default policy.
      • Support for Postgres custom types, both user defined and driver types like PGInterval or PGcircle
      • RowView: add getColumn(QualifiedType) overloads
      • SetObjectArgumentFactory and GetObjectColumnMapperFactory to easily make use of direct type support provided by your database driver (e.g. many databases now directly support java.time objects).
      • simple Jackson2 @JsonView support
      • @Unmappable lets you skip properties during pojo / bean mapping
    • Beta Api Changes
      • Qualifiers.qualifiers renamed to findFor, restyled as JdbiConfig configuration class
    • ๐Ÿ›  Bugfixes
      • Improve vavr handling of typed null
    • ๐Ÿ‘Œ Improvements
      • Improve Error handling with transactions
      • Clean up our dependencies, remove vestiges of shade plugin
      • Upgrade to antlr4
      • Rework caching to not use extra threads (#1453)
      • Any valid Java identifier is now supported as a named parameter (e.g. :์ œ๋ชฉ) or defined attribute (e.g. <์ œ๋ชฉ>).
      • Nested inTransaction and useTransaction calls are now allowed in core, provided the inner transaction specifies the same transaction isolation level, or does not specify isolation. This brings core transaction behavior in line with the existing behavior for nested @Transaction SQL object methods.
      • Nested calls on a thread to Jdbi methods useHandle, withHandle, useTransaction, withTransaction, useExtension, withExtension, or to any method of an on-demand extension will now execute against the handle from the outermost call, rather than each invocation getting a separate handle.
    • Minor source incompatibility
      • JdbiPlugin methods now throws SQLException
  • v3.6.0 Changes

    • ๐Ÿ†• New Features
      • ConnectionFactory now also may customize connection closing
      • GenericTypes.findGenericParameter(Type, Class) now also takes an index, e.g. to resolve V in Map<K, V>
      • @JdbiConstructor can now be placed on a static factory method
      • GenericMapMapperFactory enables fluent API and SqlObject support for mapping homogenously typed rows (e.g. "select 1.0 as low, 2.0 as medium, 3.0 as high") to Map<String, V> for any V that can be handled by a ColumnMapper.
      • ResultBearing.mapToMap overloads to use the GenericMapMapperFactory
      • ParsedSql can be created with ParsedSql.of(String, ParsedParameters) factory
      • ParsedParameters can be created with ParsedSql.positional(int) and ParsedSql.named(List) factories.
      • SQL array registration improvements:
      • SqlArrayType.of(String, Function) / SqlArrayTypeFactory.of(Class, String, Function) factory methods
      • Configurable.registerArrayType(Class, String, Function) convenience method
      • Sqlite support in JdbiRule (jdbi3-testing)
      • TimestampedConfig now controls the ZoneId used to generate an OffsetDateTime
      • StatementCustomizer now has a hook for before SQL statement templating
    • ๐Ÿ†• New beta API
      • Type qualifiers for binding and mapping. Use annotations to distinguish between different SQL data types that map to the same Java type. e.g. VARCHAR, NVARCHAR, and Postgres MACADDR all map to String, but are bound and mapped with different JDBC APIs.
      • Support for NVARCHAR columns, using the @NVarchar qualifying annotation
      • Support for Postgres MACADDR columns, using the @MacAddr qualifying annotation
      • Support for HSTORE columns, using the @HStore annotation
      • @Json type qualifier with Jackson 2 and Gson 2 bindings
      • Initial support for Immutables value objects
      • SqlStatement.defineNamedBindings and @DefineNamedBindings let you copy bindings to definitions
    • ๐Ÿ‘ Oracle DB support changes
      • Due to ongoing stability problems with Oracle's Maven servers, we have split the jdbi3-oracle12 artifact out of the main project, to a new home at https://github.com/jdbi/jdbi3-oracle12. This means that jdbi3-oracle12 versions will no longer stay in sync with the rest of Jdbi. Accordingly, we have removed jdbi3-oracle12 from the BOM.
    • API changes
      • SQLitePlugin now has the ServiceLoader manifest it deserves for automagical installation.
  • v3.5.2 Changes

    • ๐Ÿ› Bug Fixes
      • bindList throws an NPE if called with an immutable list, method is safe according to the specification
    • ๐Ÿ‘Œ Improvements
      • improve binding private implementations of interfaces
      • improved loggability (through SqlLogger) of JDBI's built-in Argument instances
  • v3.5.1 Changes

    ๐Ÿš€ (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
  • v3.4.0 Changes

    ๐Ÿš€ NOTE: this release's git tags are missing due to maintainer error!

    • ๐Ÿ†• New API
      • StatementException.getShortMessage
      • SqlStatements.setQueryTimeout(int) to configure the JDBC Statement queryTimeout.
    • ๐Ÿ› Bug Fixes
      • Bridge methods cause SqlObject exceptions to get wrapped in InvocationTargetException
      • Ignore static methods on SqlObject types
    • ๐Ÿ‘Œ Improvements
      • Handle null values in defined attributes
  • v3.3.0 Changes

    • ๐Ÿ†• New API
      • SerializableTransactionRunner.setOnFailure(), setOnSuccess() methods allow callbacks to be registered to observe transaction success and failure.
      • JdbiRule.migrateWithFlyway() chaining method to run Flyway migrations on the test database prior to running tests.
      • @UseStringSubstitutorTemplateEngine SQL object annotation.
      • @Beta annotation to identify non-final APIs.
      • Application developers are invited to try out beta APIs and provide feedback to help us identify weaknesses and make improvements before new APIs are made final.
      • Library maintainers are discouraged from using beta APIs, as this might lead to ClassNotFoundExceptions or NoSuchMethodExceptions at runtime whenever beta APIs change.
    • ๐Ÿ‘Œ Improvements
      • Added some extra javadoc to SqlLogger
      • @UseTemplateEngine now works with MessageFormatTemplateEngine and StringSubstitutorTemplateEngine
    • ๐Ÿ› Bug fixes
      • SqlStatement.bindMethods() (and @BindMethods) now selects the correct method when the method return type is generic.
      • mapToMap() no longer throws an exception on empty resultsets when ResultProducers.allowNoResults is true
    • ๐Ÿ’ฅ Breaking changes
      • Remove JdbiRule.createJdbi() in favor of createDataSource(). This was necessary to facilitate the migrateWithFlyway() feature above, and pave the way for future additions.
      • Remove SqlLogger.wrap() added in 3.2.0 from public API.
      • Convert MessageFormatTemplateEngine from an enum to a plain class with a public constructor. The INSTANCE enum constant has been likewise removed.
      • Remove StringSubstitutorTemplateEngine.defaults(), .withCustomizer() factory methods, in favor of the corresponding public constructors.
  • v3.2.1 Changes

    • ๐Ÿ›  Fix IllegalArgumentException "URI is not hierarchical" in FreemarkerSqlLocator.