apache / linkis

Apache Linkis builds a computation middleware layer to facilitate connection, governance and orchestration between the upper applications and the underlying data engines.
https://linkis.apache.org/
Apache License 2.0
3.29k stars 1.16k forks source link

[Feature ]Linkis metadata information storage supports multiple databases #4190

Open binbinCheng opened 1 year ago

binbinCheng commented 1 year ago

描述:Linkis的元数据信息存储支持多数据库

需求:将mybatis的mapper文件移动到resources/mapper/mysql/)下,在支持其它数据库时,可以新建一个子目录,如:resources/mapper/postgresql/


以jobhistory 为例 linkis-public-enhancements/linkis-jobhistory,当前linkis自身数据,只支持mysql 数据库方式。有些用户可能不是mysql,如果希望同时支持其他数据库如 PostgreSQL,这样用户可以根据自己实际使用情况选择使用

|-- main
|   |-- java
|   |-- resources
|   |   `-- mapper
|   |       `-- common
|   |           |-- JobDetailMapper.xml
|   |           `-- JobHistoryMapper.xml

需要适配
可以考虑 通过不同文件名区分 如

|-- main
|   |-- java
|   |-- resources
|   |   `-- mapper
|   |       `-- common
|   |           |-- JobDetailMapper.xml
|   |           `-- JobHistoryMapper.xml

|-- main
|   |-- java
|   |-- resources
|   |   |-- mysql
|   |   |   `-- mapper
|   |   |       `-- common
|   |   |           |-- JobDetailMapper.xml
|   |   |           `-- JobHistoryMapper.xml
|   |   `-- postgresql
|   |       `-- mapper
|   |           `-- common
|   |               |-- JobDetailMapper.xml
|   |               `-- JobHistoryMapper.xml

Description: Linkis metadata information storage supports multiple databases

Requirement description: Move the mapper file of mybatis to resources/mapper/mysql/), and create a new subdirectory when supporting other databases, such as: resources/mapper/postgresql/

github-actions[bot] commented 1 year ago

:blush: Welcome to the Apache Linkis community!!

We are glad that you are contributing by opening this issue.

Please make sure to include all the relevant context. We will be here shortly.

If you are interested in contributing to our website project, please let us know! You can check out our contributing guide on :point_right: How to Participate in Project Contribution.

Community

WeChat Assistant WeChat Public Account

Mailing Lists

Name Description Subscribe Unsubscribe Archive
dev@linkis.apache.org community activity information subscribe unsubscribe archive
rottenmu commented 1 year ago

accept issue

sjgllgh commented 1 year ago

We adapted postgresql, #4524