-
Notifications
You must be signed in to change notification settings - Fork 43
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
support multiple gorm #79
Comments
Good idea, we can add it later, or if you're interested, you can submit pr |
这个似乎和plus没有太大的关系我写了个方法在有需要的地方自己去切换数据源。类似这样: func DbChange(tag string){ |
In actual projects, multiple data sources must be used concurrently at the same time, so the value of global variables cannot be switched through one method. We can provide API of gplus through the methods of an object, and then distinguish different data sources through the attribute values of the object. For example:
However, this will change the API of gplus. |
So far, go doesn't support generic methods. |
We need to connect to multiple databases in our project, but gplus's gorm as a global variable.
can gplus support multi gorm??
The text was updated successfully, but these errors were encountered: