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
- Added
jdbc-milvusdriver module andVectorSqlDialectinterface. Lambda API now supports vector range queries and sorting queries, adapting to PostgreSQL, Elastic7/8, and Milvus data sources. - Extended date and vector type handling capabilities through
JulianDayTypeHandler,PgDateTypeHandler, andPgVectorTypeHandler. Read more → - Added
queryForPairsmethod to directly map two columns of query results intoMap<K, V>. Read more → - Fixed identifier injection vulnerability in
AbstractDialect.fmtName()(Freedom mode), unifying escape logic across all dialects. - Aligned
useGeneratedKeysexecution path for@Insertannotation 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-milvusdriver. - dbvisitor-driver module:
JdbcResultSetArray 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-milvusdriver module, completing Milvus vector database adapter (supports DB/Index/Partition/Table commands, DML statements, Hints). - Added
Elastic8Dialectfor Elasticsearch 8.x support. - Added
VectorSqlDialectinterface. 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
QueryCompareandQueryFuncinterfaces. - 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
useGeneratedKeysmethod toGeneratedKeyHandlerinterface. - Added
queryForPairsandqueryForPairsByNamemethods toQueryFuncinterface, mapping two columns of query results directly intoMap<K, V>. - Added
JsonArrayList,JsonHashMap,JsonHashSet,JsonType— four types for structure conversion when querying JSON data types viaqueryForObject. - Added Spring Boot 4 compatible example project.
- Added
- Improvements
- Optimized
JdbcResultSet.getArray()to auto-adaptList/Set/Object[]/Primitive Arraytojava.sql.Array. - Optimized
#{field, typeHandler=...}null value handling with automatic JDBC type inference, eliminating the need to explicitly specifyjdbcType. - PostgreSQL dialect now implements
SeqSqlDialectinterface, adding sequence query support (selectSeq).
- Optimized
- Bug Fixes
- Fixed inconsistent
useGeneratedKeysbehavior between@Insertannotation and XML mappers. - Fixed NPE thrown by
queryForMapwhen querying rows with all null values. - Fixed
@Tableannotation not being detected when onlyddlAutoattribute was configured. - Fixed
JdbcTemplate.loadSplitSQL()incorrectly skipping SQL fragments that start with comments. - Fixed
@BindTypeHandlerannotation incorrectly treating Map subclasses as plain Maps. - Fixed
ArrayTypeHandlerreturning null for PostgreSQL empty arrays (added internal type name mappings). - Fixed missing AND/OR connectors when using
apply()to concatenate raw SQL fragments. - Fixed
PostgreSqlDialectSQL generation errors ininsertIgnore(missingINTO) andinsertReplace(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
useGeneratedKeysgenerated primary keys not being backfilled into parameter Maps. - Fixed DAO proxy interface methods throwing
IndexOutOfBoundsExceptionon empty query results. - Fixed
queryStatementwrapping null returns as[null]single-element lists. - Fixed
BaseMapper.insert()handling logic when passed an empty collection. - Fixed
ColumnMapping.getKeyTpe()method name typo, corrected togetKeyType(). - Fixed identifier injection vulnerability in
AbstractDialect.fmtName()(Freedom mode), unifying escape logic in the base class.
- Fixed inconsistent