v6.6.0 (2026-01-25)
<dependency>
<groupId>net.hasor</groupId>
<artifactId>dbvisitor</artifactId>
<version>6.6.0</version>
</dependency>
Hint
This article is generated by AI translation.
Highlights
- Added support for nesting rules within other rules.
- Added documentation for rules, detailing the newly added case/when/else rules.
Impact Scope
- dbvisitor Dynamic SQL Rule Engine (
@{and},@{or},@{in},@{case}, etc.), stability, security, and the ability to flexibly handle dynamic SQL expressions have been improved.
Changes
- New Features
- Added case/when/else rules for more flexible branching.
- Added support for nesting rules within other rules.
- Optimizations
- Optimized jdbc-elastic, jdbc-mongo, and jdbc-redis to include defensive programming for resource release when acquiring connections.
- Optimized
@{and},@{or}and other rules to fully remove multi-value restrictions. After removal, they can adapt to nesting like theinrule.
- Fixes
- Fixed
MD5Ruleissue where it did not supportSqlArgtype parameters for MD5 encryption processing. - Fixed logic for null value judgment in
@{and},@{or}. Now, when all parameters referenced in a condition fragment arenull, the fragment will be automatically and correctly discarded (previous behavior was inconsistent). - Fixed an issue where if a string inside a dynamic expression contained a closing brace
}(e.g.,#{ '}' }), the parser might incorrectly recognize it as the end of the expression.- This could cause subsequent content to be directly concatenated as SQL fragments, potentially posing a SQL injection risk in specific scenarios.
- Fixed an issue where the parser incorrectly identified a comma
,inside a quoted string or function argument as a rule separator (e.g.,@{rule, 'a,b'}used to be incorrectly truncated). - Fixed an issue where the driver adapter might not retrieve a complete list of properties.
- Fixed
- Documentation
- Added rule documentation detailing the usage of the newly added case/when/else rules and other rules.
- Refactored the official dynamic rule documentation, adding a visual comparison of
RulevsXMLand supplementing detailed usage of advanced rules.