- Add dialect for MariaDB (#56)
- Fix byte[] instantiation on MariaDB Connector/J 3.x (#54)
- Support
@DalesbredInstantiator
on static methods - Migrate build to Gradle 7.2
- Specify optional dependencies as Gradle's features
- Bump dependencies to latest versions
- Replace
@SQL
-annotation in all methods with@Language("SQL")
since IDEA does not detect@Language
from a meta-annotation anymore.
- Fix query timeouts
Support passing primitive key and values types for findMap
.
- Add support for statement timeouts (#45)
- Upgraded the version of optional Kotlin dependency to 1.3.61.
- Add Java 9 module automatic module names for jars. (#41)
- Support pretty printing of
ResultTable
s
- Updated the versions of optional dependencies.
- Fix reference to
@DalesbredInstantiator
in exception message
- Add optional fetch size and direction to SqlQuery (#37)
- Add optional Kotlin-support;
org.dalesbred.integration.kotlin
package adds Kotlin extensions toDatabase
. - Add
updateUnique
toDatabase
(#32)
- New convenience methods for
QueryBuilder
.
- Add
findOptionalInt
,findOptionalLong
andfindOptionalDouble
methods toDatabase
.
org.slf4j:slf4j-api
was marked as optional dependency in POM, although it's required.
- Allow annotating constructors with
@DalesbredInstantiator
to always use the annotated constructor instead of trying to detect constructor automatically. (#19) - Support binding arrays on Oracle, which does not support standard JDBC API.
- Add dialect for H2. (#20)
- Support property paths when binding (instead of just simple names). (#7)
- Relax
SqlArray.of
andSqlArray.varchars
to accept anyCollection
instead of justList
s.
- Add support for registering custom key functions for native enums.
- Fail faster if registering native enum conversion on Dialect that does not support native enums.
- Removed support for Guice and AOP Alliance.
- Removed
@DalesbredTransactional
andTransactionalProxyFactory
. - Removed support for transaction retries.
- Simplified API for registering enum conversions
through
TypeConversionRegistry
. (#14)
- Renamed
InstantiationException
toInstantiationFailureException
because the former was already used injava.lang
. - Database native enums are no longer the default because they depended on ugly hack to
guess the database type name. By default enums are bound using name, but you can use
methods in
TypeConversionRegistry
to customize this. - Removed support for setting configuring default isolation level. If you need to set the default isolation, set it for the connections at your connection-provider.
- Removed
Database.getDialect
. There should not be a need to access the Dialect directly.
- New
updateBatchAndProcessGeneratedKeys
for performing batch updates and returning generated keys. (#9) - Guide for migration from 0.x. (#6)
- Generalized
findMap
to allow more than one column for instantiating the value. (#2)
- Removed
InstantiatorRegistry
,Instantiator
and related classes/methods from public API. - Moved
TypeConversionRegistry
toorg.dalesbred.conversion
and removedTypedConversion
from public API. Register conversion functions to TypeConversionRegistry instead. - Removed
getCount
fromNonUniqueResultException
so that its possible to throw the exception without reading all rows from database. ResultTable.getColumnTypes()
now returnsType
-objects. NewResultTable.getRawColumnTypes
returns rawClass<?>
-objects. SimilarlygetType
inResultTable.ColumnMetadata
now returnsType
and raw class can be returned withgetRawType
.- Renamed
VariableResolvers.resolverForMap/resolverForBean
toVariableResolver.forMap/forBean
. - Made
TransactionContext
an interface instead of abstract class. - Removed
Database.createTransactionalProxyFor
. UseTransactionalProxyFactory.createTransactionalProxyFor
instead. - Removed accessors for isolation
Database
.Database.getTransactionManager
can be used to accessTransactionManager
for configuring these. - Removed support for configuring default propagation. Use propagation on per-transaction basis.
- Ignore underscores on Java fields and setters when resolving instantiators. ( Fixes #3)
- Reverted functionality of
findUniqueOrNull
andfindOptional
to return null/empty when single null result is returned.
First alpha for 1.0 -version of Dalesbred. This is not source compatible with previous versions, but unless you have been using really obscure features, just renaming packages in imports should be enough.
- New family of
findOptional
-methods inDatabase
, returningjava.util.Optional
values. - Added
EmptyResultException
as a subclass ofNonUniqueResultException
for case with zero results.
- Renamed base package
fi.evident.dalesbred
toorg.dalesbred
. - Other package renames:
fi.evident.dalesbred.dialects
->org.dalesbred.dialect
fi.evident.dalesbred.lob
->org.dalesbred.datatype
fi.evident.dalesbred.results
->org.dalesbred.result
fi.evident.dalesbred.support
->org.dalesbred.integration
fi.evident.dalesbred.tx
->org.dalesbred.transaction
- Moved some classes to new packages:
- All annotations to
org.dalesbred.annotation
- All transaction-related classes to
org.dalesbred.transaction
. fi.evident.dalesbred.SqlQuery
->org.dalesbred.query.SqlQuery
fi.evident.dalesbred.SqlArray
->org.dalesbred.datatype.SqlArray
fi.evident.dalesbred.ResultTable
->org.dalesbred.result.ResultTable
fi.evident.support.proxy.TransactionalProxyFactory
->org.dalesbred.transaction.TransactionalProxyFactory
- All annotations to
- Moved classes that are technically
public
, but are not part of Dalesbred's supported API toorg.dalesbred.internal
. - Removed
SqlQuery.confidential
. Some database drivers will print the values passed to database in exceptions anyway, so the only safe way to make sure that values are not revealed inadvertently is not to show exceptions at all. - Removed
NamedParameterQueries.namedQuery
. UseSqlQuery.namedQuery
instead. - Moved
fi.evident.dalesbred.Reflective
to test folder so that it's not visible in API. - Renamed
fi.evident.dalesbred.Transactional
toorg.dalesbred.annotation.DalesbredTransactional
so that it does not clash with Spring's@Transactional
- Removed
fi.evident.dalesbred.instantiation.InstantiationListener
completely. - Removed
fi.evident.dalesbred.connection.DriverManagerDataSourceProvider
. Neworg.dalesbred.connection.DriverManagerConnectionProvider
can be used instead.
- Support instantiating arrays and collections of instantiable types from database arrays.
- Support binding collections as SQL arrays.
- Delegate
PreparedStatement
-binding toDialect
s. - Added
@DalesbredIgnore
for ignoring constructors, fields and setters.
- Added support for ThreeTen, the backport of java.time.
- Support for retrieving generated keys.
- Use
ResultSetMetadata.getColumnLabel
instead ofResultSetMetadata.getColumnName
to fetch names of columns in results as the latter didn't use column aliases on some databases. (Thanks to Christoph Gritschenberger.) - Added OSGi-headers to jar. (Thanks to Christoph Gritschenberger.)
- Added SingleConnectionTransactionManager for third-party integration.
- Migrated the build to use Gradle instead of Maven. (Shouldn't affect users in any way.)
- Updated versions of the optional dependencies.
- Minimum supported JDK version is now 1.6.
- Support java.time when running on Java 8.
- Added withVoidTransaction method family along with VoidTransactionCallback
- Added adapter for using Dalesbred's own @Transactional annotations with Spring.
- Fixed building Joda LocalDates from database timestamps.
- Fixed building Joda LocalDates from database dates.
- Support adding sub-queries to QueryBuilder.
- Support native XML-types of databases.
- Support converting InputStreams/Readers to and from blobs/clobs.
- Fixed handling null values in conjunction with conversions on reflective bindings.
- Improved initialization hooks for Spring DalesbredConfigurationSupport.
- Support configuring the way that enums are stored to database.
- Fixed handling of null result values in MapResultSetProcessor.
- Integration with Spring Framework.
- Support for pluggable transaction management strategies.
- Added dialects for Oracle and MySQL.
- Support converting Clobs to Strings and Blobs to byte-arrays.
- Support for named parameters in SQL-queries.
- Remove underscores from database column names when mapping them to properties (ie. 'foo_bar' matches 'fooBar').
- Since many databases will uppercase or lowercase column names, ignore the case differences in names when finding setters or fields matching the result-set.
- Removed required dependency to javax.inject. Now Dalesbred has no required dependencies to third-party libraries.
- Support for batch updates.
- Log execution time of queries.
- Changed most of the tests to use in-memory HSQLDB.
- Added dialect for HSQLDB.
- Added builtin conversions for java.util.TimeZone and org.joda.time.DateTimeZone.
- Allow type conversions to be registered for interfaces in addition to concrete types.
- Support registering custom instantiators for types.
- Added support for InstantiationListeners, which receive notifications whenever instantiators create new objects.
- When configuring the system with Guice, newly instantiated objects will automatically receive Guice injections to their members.
- More flexible reflection instantiation: if result has more column than constructor has parameters, the instantiator will try to set the extra columns using setters or direct fields access.
- Pass more information about the results to instantiators.
- Added support for confidential query parameters, which never show up in logs.
- Exceptions thrown when executing a query will reference the query that caused the exception to be thrown.
- Changed the way that Isolation and Propagation are configured, so that the default isolation and propagation can be specified at Database-level even when using annotations.
- Support for converting Transactional-annotation into TransactionSettings.
- Support passing Provider instead of Database when creating TransactionalTests.
- Support for user defined type-conversions.
- Optional Guice-support.
- Optional support for AOP Alliance interceptors.
- Bug fix: release InitialContext properly when looking up DataSource by JNDI-name.
- Various small improvements.
- Added this changelog.