Skip to main content
Hint

This article is generated by AI translation.

v6.7.0 (2026-02-15)

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

Highlights

  1. Added jdbc-milvus driver module and VectorSqlDialect interface. Lambda API now supports vector range queries and sorting queries, adapting to PostgreSQL, Elastic7/8, and Milvus data sources.
  2. Extended date and vector type handling capabilities through JulianDayTypeHandler, PgDateTypeHandler, and PgVectorTypeHandler. Read more →
  3. Added queryForPairs method to directly map two columns of query results into Map<K, V>. Read more →
  4. Fixed identifier injection vulnerability in AbstractDialect.fmtName() (Freedom mode), unifying escape logic across all dialects.
  5. Aligned useGeneratedKeys execution path for @Insert annotation and XML mappers, enabling correct primary key backfill.

Impact Scope

  • dbvisitor core module: Type Handler extensions, Fluent API (vector queries), dynamic SQL engine, pagination, DAO proxy, security fixes.
  • dbvisitor-adapter module: Added jdbc-milvus driver.
  • dbvisitor-driver module: JdbcResultSet Array type compatibility enhancement.
  • Dialect system: Added Elastic8Dialect, VectorSqlDialect; PostgreSQL dialect gains sequence support, SQL generation fixes, identifier escape hardening.
  • Integration module: Added Spring Boot 4 compatible example.

Changes

  • New Features
    • Added jdbc-milvus driver module, completing Milvus vector database adapter (supports DB/Index/Partition/Table commands, DML statements, Hints).
    • Added Elastic8Dialect for Elasticsearch 8.x support.
    • Added VectorSqlDialect interface. Lambda API now supports vector range queries and vector sorting queries (adapting PostgreSQL, Elastic7/8, Milvus).
    • Added fine-grained vector query support for 6 vector metric modes via QueryCompare and QueryFunc interfaces.
    • Added JulianDayTypeHandler — uses Julian Day Number for unified storage of BCE/CE dates, avoiding calendar conversion ambiguity.
    • Added PgDateTypeHandler — handles BCE dates using PostgreSQL native BC suffix format.
    • Added PgVectorTypeHandler — handles PostgreSQL pgvector vector type data read/write. Read more →
    • Added useGeneratedKeys method to GeneratedKeyHandler interface.
    • Added queryForPairs and queryForPairsByName methods to QueryFunc interface, mapping two columns of query results directly into Map<K, V>.
    • Added JsonArrayList, JsonHashMap, JsonHashSet, JsonType — four types for structure conversion when querying JSON data types via queryForObject.
    • Added Spring Boot 4 compatible example project.
  • Improvements
    • Optimized JdbcResultSet.getArray() to auto-adapt List/Set/Object[]/Primitive Array to java.sql.Array.
    • Optimized #{field, typeHandler=...} null value handling with automatic JDBC type inference, eliminating the need to explicitly specify jdbcType.
    • PostgreSQL dialect now implements SeqSqlDialect interface, adding sequence query support (selectSeq).
  • Bug Fixes
    • Fixed inconsistent useGeneratedKeys behavior between @Insert annotation and XML mappers.
    • Fixed NPE thrown by queryForMap when querying rows with all null values.
    • Fixed @Table annotation not being detected when only ddlAuto attribute was configured.
    • Fixed JdbcTemplate.loadSplitSQL() incorrectly skipping SQL fragments that start with comments.
    • Fixed @BindTypeHandler annotation incorrectly treating Map subclasses as plain Maps.
    • Fixed ArrayTypeHandler returning null for PostgreSQL empty arrays (added internal type name mappings).
    • Fixed missing AND/OR connectors when using apply() to concatenate raw SQL fragments.
    • Fixed PostgreSqlDialect SQL generation errors in insertIgnore (missing INTO) and insertReplace (missing commas in SET clause).
    • Fixed pagination offset calculation error in usePage() method (incorrect call order).
    • Fixed <where>/<set> dynamic tags failing to strip uppercase prefixes (AND/OR).
    • Fixed @{and}/@{or} dynamic rules not skipping conditions when parameters are null.
    • Fixed useGeneratedKeys generated primary keys not being backfilled into parameter Maps.
    • Fixed DAO proxy interface methods throwing IndexOutOfBoundsException on empty query results.
    • Fixed queryStatement wrapping null returns as [null] single-element lists.
    • Fixed BaseMapper.insert() handling logic when passed an empty collection.
    • Fixed ColumnMapping.getKeyTpe() method name typo, corrected to getKeyType().
    • Fixed identifier injection vulnerability in AbstractDialect.fmtName() (Freedom mode), unifying escape logic in the base class.