Releases: jhannes/fluent-jdbc
Support for DatabaseColumnReference in queries
Example:
DatabaseTableAlias m = memberships.alias("m");
DatabaseTableAlias p = persons.alias("p");
DatabaseTableAlias o = organizations.alias("o");
List<String> result = m.join(m.column("person_id"), p.column("id"))
.join(m.column("organization_id"), o.column("id"))
.whereIn(o.column("name"), Arrays.asList("Army", "Boutique"))
.whereOptional(p.column("name"), null)
Additionally, dependendencies have been upgraded
BUGFIX to DatabaseSaveBuilder.uniqueKey + CLOB/BLOB support
IMPORTANT BUG FIX
DatabaseQueryable.whereAll
accidentally returned a new query without the where-statements set for DbContextTable
and DatabaseTable
, meaning that among other things DatabaseSaveBuilder.uniqueKey
and DbContextSaveBuilder.uniqueKey
would update a random row instead of inserting a new row.
- Added support for large binary and string data with
DatabaseRow.getInputStream
,DatabaseRow.getReader
and support forReader
andInputStream
inDatabaseStatement.bindParameter
Support for arbitrary SQL statements *BROKEN*
Please note: fluent-jdbc 0.2.0 has a serious error, especially concerning DatabaseSaveBuilder.uniqueKey
. Please upgrade to fluent-jdbc 0.2.1
If you want to use the statement parameter mapping and ResultSet mapping in fluent-jdbc and map your objects with the list or singleObject-methods, this release has you covered. Added DatabaseStatement, DbContextStatement, DatabaseSqlBuilder and DbContextSqlBuilder which lets you manually or with a builder syntax pass arbitrary SQL to fluent-jdbc methods, taking advantage of data conversion and mapping features even when you need to go beyond fluent-jdbc syntax
Version 0.1.0
fluent-jdbc is now being used in critical production and deserves a version bump.
New features:
- Query reporting: An observer structure allows metrics and logging for database operations
- Array support: The array type is supported with int and string arrays on H2, HSQLDB and PostgreSQL
- Multi-column join: Joins with more than one join column is now supported
Documentation and naming
Rename DbContext-classes to be prefixed with DbContext in a consistent way. Add Javadoc for all classes
Javadoc
About half of the exposed API know has proper Javadoc.
This release also makes it possible to nest DbContext.startConnection
Oracle support
Added tests to show support for Oracle.
Also:
- Support for string primary key with DatabaseInsertBuilder
DatabaseSaveResult.updated with difference
DatabaseSaveResult contains a list of rows with difference when DatabaseSaveBuilder updates an existing row.
Support for left joins.
Better support for mappings with joins
DatabaseRow.table simplifies reuse of mapping logic in joins
Optionals as return from singleXXX
DbListableSelectContext.singleXXX and all implementations now return Optional instead of null-values.
- Support for OffsetDateTime
- DbListableSelectContext.getCount