Skip to main content

v6.7.1 (2026-07-14)

<dependency>
<groupId>net.hasor</groupId>
<artifactId>dbvisitor</artifactId>
<version>6.7.1</version>
</dependency>

Highlights

  1. Reworked batch inserts and generated-key backfill so each dialect can select JDBC Batch, multi-values, one-by-one, or ResultSet-based execution.
  2. Added GeneratedKeySource and GeneratedKeyStrategy, including keys returned through SQL Server OUTPUT INSERTED.
  3. Unified insert capabilities for ClickHouse, DB2, DM, H2, MySQL, Oracle, PostgreSQL, and SQL Server under InsertSqlDialect.

Impact Scope

  • Build system: migrated from Maven to Gradle.
  • Insert execution: batch inserts, conflict strategies, sequences, identity keys, and generated-key backfill.
  • Dialects: ClickHouse, DB2, DM, H2, MongoDB, MySQL, Oracle, PostgreSQL, and SQL Server.
  • Type handling: date/time, arrays, and UUID generated-key compatibility.
  • JDBC adapters: adapter registration API, Milvus async commands, and extension instantiation.

Changes

  • New Features
    • Added GeneratedKeySource for choosing between JDBC getGeneratedKeys and the current ResultSet in @Insert and XML insert mappings.
    • Added GeneratedKeyStrategy for JDBC Batch, batched generated keys, multi-values ResultSet, and one-by-one execution.
    • Added SQL Server OUTPUT INSERTED support for multi-row key retrieval and backfill.
    • Added the ClickHouse dialect and keyword definitions.
    • Added sequence and insert capabilities for DB2 and H2; added sequence queries and MERGE-based conflict updates for DM.
  • Improvements
    • Moved batch-insert strategy selection into InsertSqlDialect, where each dialect describes SQL generation, conflict support, and generated-key behavior.
    • Selects Batch, multi-values, or one-by-one execution according to actual database and driver capabilities.
    • Avoids invalid Ignore/Update SQL when an insert contains only primary-key columns.
    • Standardized extension instantiation through Cobble 5.x for dialects, type handlers, SQL rules, key-holder factories, data sources, and adapters.
    • Renamed adapter registration from lookup to register and added a ClassLoader overload; lookup now resolves adapters only by name.
    • Improved synchronous waiting for Milvus asynchronous commands.
  • Bug Fixes
    • Fixed cross-database behavior in multiple date/time TypeHandlers.
    • Fixed database-array compatibility in ArrayTypeHandler.
    • Fixed concatenated column names in the MySQL DEFAULT orderByNulls strategy.
    • Added target-type validation before injecting UUID32 and UUID36 generated values.

Upgrade Notes

  • The Maven Wrapper has been removed. Use ./gradlew or ./build.sh for source builds.
  • Custom adapters using the former AdapterManager.lookup(..., ClassLoader) registration API should migrate to register.
  • Custom InsertSqlDialect implementations should return an explicit GeneratedKeyStrategy; use GeneratedKeySource.ResultSet when keys are returned through the insert ResultSet.