Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: 新增easy-orm对clickhouse支持 #1

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

PengyuDeng
Copy link

clickhouse对hsweb的支持需要修改两个仓库hsweb-commons-curd和hsweb-easy-orm。
暂时用这种方式实现对两个仓库的支持,
过段时间把clickhouse的数据类型和java类型匹配上。

@PengyuDeng PengyuDeng changed the title add: 新增对easy-orm对clickhouse支持 add: 新增easy-orm对clickhouse支持 Sep 11, 2023
@zhou-hao
Copy link
Member

  1. hsweb-framework里可以通过配置easyorm.dialect-typeeasyorm.schema-type来自定义方言,不过并不建议这样用。
  2. 看上去并不需要修改hsweb-easy-orm的源代码

@PengyuDeng
Copy link
Author

1.我去研究下
2.好像是哦,可以把属于hsweb-easy-orm的代码放在hsweb-framework里面。

@zhou-hao
Copy link
Member

2.好像是哦,可以把属于hsweb-easy- orm的代码放在hsweb-framework里面。

也可以就放在这里

@PengyuDeng
Copy link
Author

周总你看看我最新的提交呢。

* @author dengpengyu
* @date 2023/9/18 16:14
*/
public interface Dialect extends Feature {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看上去不应该复制(覆盖)这个类

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@@ -23,7 +19,7 @@
@Data
public class EasyormProperties {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不应该覆盖原是包名以及类

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@@ -0,0 +1,3 @@
# Auto Configure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spring 2.7已经弃用了这种配置方式,应当使用

META-INF
     |--- spring
     |------org.springframework.boot.autoconfigure.AutoConfiguration.imports     

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@PengyuDeng
Copy link
Author

PengyuDeng commented Sep 20, 2023

image
我之前的想法是,引入这个包单独使用clickhouse,不考虑多种类数据库支持。
现在我的想法是实现ReactiveCrudService,不走注入那一套,就可以支持多种类库。
我这样的方式,路径是对的吗。

@zhou-hao
Copy link
Member

zhou-hao commented Sep 21, 2023

image 我之前的想法是,引入这个包单独使用clickhouse,不考虑多种类数据库支持。 现在我的想法是实现ReactiveCrudService,不走注入那一套,就可以支持多种类库。 我这样的方式,路径是对的吗。

这种方式是正确的使用方式。不过不应该在Service里创建Database。你可以单独写一个类来创建相关实例,类似jetlinks社区版中的tdengine。比如写一个

ClickHouseHelper{
     <T,K> ReactiveRepository<T,K>  createRepository(Class<T> clazz);

    ....
}

@PengyuDeng
Copy link
Author

周总你看看来着。

@PengyuDeng
Copy link
Author

周总现在呢。差不多写完整了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants