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

Changelog History
Page 4

  • 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.
  • v3.2.0 Changes

    • 🆕 New modules:
      • jdbi3-testing - JdbiRule test rule for JUnit tests
      • jdbi3-freemarker - render SQL templates using FreeMarker
      • jdbi3-commons-text - render SQL templates using Apache commons-text StringSubstitutor
      • jdbi3-sqlite - plugin for use with SQLite database
    • 🆕 New API
      • @SqlScript annotation to execute multiple statements
      • SqlLogger for logging queries, timing, and exceptions. Replacing TimingCollector, which is now deprecated
      • Add ResultProducers.allowNoResults configuration option in case you may or may not get a result set
      • MessageFormatTemplateEngine template engine, renders SQL using java.text.MessageFormat
      • SqliteDatabaseRule test rule (in jdbi3-core test jar)
    • 👌 Improvements
      • @MaxRows.value() may now be omitted when used as a parameter annotation
      • SerializableTransactionRunner 'max retries' handling throws more meaningful exceptions
      • Postgres operators like '?' and '?|' may now be used without being mistaken for a positional parameter. Escape them in your SQL statements as '??' and '??|', respectively.
      • Support for binding OptionalInt, OptionalLong, and OptionalDouble parameters.
    • 🐛 Bug fixes:
      • SqlObject default methods now work in JDK 9
      • SqlObject no longer gets confused about result types due to bridge methods
      • StringTemplate no longer shares template groups across threads, to work around concurrency issues in StringTemplate project
      • DefineStatementLexer handles predicates that look like definitions better. No more errors on unmatched "<" when you really meant "less than!"
      • LocalDate binding should store the correct date when the server and database are running in different time zones.
  • v3.1.1 Changes

    • 👌 Improve IBM JDK compatibility with default methods
    • 👍 Allow non-public SqlObject types!!!
    • 🛠 Fix some ThreadLocal and StringTemplate leaks
  • v3.1.0 Changes

    • The strict transaction handling check in Handle.close() may be disabled via getConfig(Handles.class).setForceEndTransactions(false).
    • 👍 StringTemplate SQL locator supports StringTemplate groups importing from other groups.
    • 🆕 New RowReducer interface and related APIs make it simple to reduce master-detail joins into a series of master objects with the detail objects attached. See:
      • RowReducer interface
      • LinkedHashMapRowReducer abstract implementation for 90% of cases
      • ResultBearing.reduceRows(RowReducer)
      • @UseRowReducer SQL Object annotation
    • 🛠 Fixed bug in PreparedBatch preventing batches from being reusable.
    • ➕ Additional Kotlin convenience methods to avoid adding ".java" on every Kotlin type:
      • Jdbi.withExtension(KClass, ExtensionCallback)
      • Jdbi.useExtension(KClass, ExtensionConsumer)
      • Jdbi.withExtensionUnchecked(KClass, callback)
      • Jdbi.useExtensionUnchecked(KClass, callback)
    • EnumMapper tries a case insensitive match if there's no exact match
    • 👍 OracleReturning.returningDml() supports named parameters
    • 🛠 Fixed regression in Postgres typed enum mapper, which caused a fallback on the Jdbi default enum mapper.