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

Feature Request: Connection switching for multiple databases #2456

Closed
hareku opened this issue May 13, 2019 · 2 comments
Closed

Feature Request: Connection switching for multiple databases #2456

hareku opened this issue May 13, 2019 · 2 comments

Comments

@hareku
Copy link

hareku commented May 13, 2019

I request to implement connection switching for multiple databases.
It's like Rails 6 ActiveRecord feature.
rails/rails#34052

In the case of gorm, I think it maybe above this code.

type User struct {}

func (User) WritingDBName() string {
  return "user_writing_db"
}
func (User) ReadingDBName() string {
  return "user_reading_db"
}

If I can implement this feature, is it possible to merge?

@stevenkitter
Copy link

Very good idea, I prefer to this too.

@github-actions
Copy link

github-actions bot commented Jul 9, 2020

This issue will be automatically closed because it is marked as GORM V1 issue, we have released the public testing GORM V2 release and its documents https://v2.gorm.io/docs/ already, the testing release has been used in some production services for a while, and going to release the final version in following weeks, we are still actively collecting feedback before it, please open a new issue for any suggestion or problem, thank you

Also check out https://github.com/go-gorm/gorm/wiki/GORM-V2-Release-Note-Draft for how to use the public testing version and its changelog

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

No branches or pull requests

2 participants