Repository navigation
fix(方言): 保留PostgreSQL精确字符串关联索引 - #145
Merged
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.2 #145 +/- ##
=============================================
+ Coverage 64.92% 81.23% +16.30%
- Complexity 2341 3746 +1405
=============================================
Files 343 385 +42
Lines 9375 11463 +2088
Branches 940 1417 +477
=============================================
+ Hits 6087 9312 +3225
+ Misses 2810 1510 -1300
- Partials 478 641 +163 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
当声明
exactString的 PostgreSQL 列与现有默认排序规则的业务列关联时,强制添加COLLATE "C"会让比较采用另一种排序规则,原业务列的主键索引无法用于该条件,查询退化为全表扫描。PostgreSQL 方言改为沿用数据库默认的确定性排序规则,保留大小写、重音及尾空格的精确比较,同时保持与现有业务列的关联索引兼容。其他方言的映射不变。
验证:
DialectTest与PostgresqlExactStringIntegrationTest共 9 项通过,0 失败、0 错误、0 跳过。消费者:jetlinks-components #1712 改为使用通用
@ColumnType(exactString = true)声明,移除业务侧的方言配置识别和专用实体定制器。这是列定义生成的修正,不自动迁移已有显式
COLLATE "C"的物理列。