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

建议增加独立配置文件以及通过属性注解支持分库 #1865

Open
athinboy opened this issue Aug 1, 2024 · 3 comments
Open

建议增加独立配置文件以及通过属性注解支持分库 #1865

athinboy opened this issue Aug 1, 2024 · 3 comments

Comments

@athinboy
Copy link

athinboy commented Aug 1, 2024

Feature 特性

1、增加对独立freesql配置文件(xml、json、yaml)的支持。代码里面只需要传递配置文件路径。
2、在配置文件里面可以配置多个数据库连接。比如
A:192.168.0.1/aaaa
B:192.168.0.1/bbbb
这样的话,在类上增加属性[DB(a)]。这样就可以很方便支持多数据库连接。
或者[Table(Name = "A.T1.Comment")][Table(Name = "B.T2.Comment")]

简要描述原因

1、独立的配置文件,方便多项目共享统一配置。而且不是通过代码进行配置,不用编译代码,方便修改部署尤其是面对容器化云部署速度更快,更好管理。

使用场景

@2881099
Copy link
Collaborator

2881099 commented Aug 1, 2024

这个可以自己封装一层啊

@athinboy
Copy link
Author

athinboy commented Aug 2, 2024

这个可以自己封装一层啊

对于第一点可以封装。但是作为一个优秀的开源产品,越完善越好。
注解分库那个,自己弄不了。需要freesql内部控制数据库连接。

@2881099
Copy link
Collaborator

2881099 commented Aug 2, 2024

看一下 FreeSql.Cloud

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

No branches or pull requests

2 participants