[WIP] feat: 支持高斯数据库以及更多国产库的兼容模式 - #26
Open
fangzhengjin wants to merge 7 commits into
Open
Conversation
- 更新 MyBatis-Plus 版本至 3.5.12 - 移除 ALLOW_DB 列表,改为在 DbTypeEnum 中定义允许的数据库类型 - 增加对更多数据库类型的支持,包括 Oracle、PostgreSQL、MySQL 等 - 优化数据库类型的自动识别逻辑
- 在数据源模块中添加 Gauss 相关配置和映射文件 - 增加兼容数据库的兜底加载策略
- 在 SnailJobTemplateAutoConfiguration 中添加 mybatisPlusPropertiesCustomizer 方法 - 根据数据库类型设置全局配置的 ID 类型 - 针对高斯和 OpenGauss 数据库使用 ASSIGN_ID(雪花 ID) - 其他数据库保持 AUTO 类型 - 移除各实体类中不必要的 IdType 导入和 AUTO 类型设置
- 这个改动可以解决在数据传输过程中 Long 类型数据(雪花ID)精度丢失的问题
- 这个改动可以解决在数据传输过程中 Long 类型数据(雪花ID)精度丢失的问题
Collaborator
|
感谢你的PR,我review完了代码,目前没有计划在支持其他的数据库了, 这个PR可以作为一个参考,或许其他的小伙伴有类似的需求, |
Author
@open-snail 其实这个 PR不只是用作支持高斯的,因为有很多国产数据库基本都是 PG,MySQL,Oracle这三种模式,所以大部分情况下只需需要支持这三种兼容语法模式就可以了,根据实际的国产数据库来配置一下他当前的兼容语法,应该能支持90%的国产数据库,现有的Mapper 文件也可以复用,不过现在这个PR确实还没测试完 |
Collaborator
我明白你的意思,这块我会充分考虑一下,方便的支持更多的数据库 |
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.
Uh oh!
There was an error while loading. Please reload this page.