You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes people want to write a master and read from one or more replicated database for performance reasons.
Allowing people to override the repos for reads and writes would not be too hard and would make LuckyRecord more suitable for high performance/high availability requirements.
classMasterRepo < LuckyRecord::BaseRepoendclassReadRepoOne < LuckyRecord::BaseRepoendclassReadRepoTwo < LuckyRecord::BaseRepoendabstractclassBaseModeldefrepo_for_reads# Choose one of the slave repos to read from
[ReadRepoOne, ReadRepoTwo].sample
enddefrepo_for_writesMasterRepo# Write to masterendendMasterRepo.configure do
settings.url =# connect to masterend
The text was updated successfully, but these errors were encountered:
Sometimes people want to write a master and read from one or more replicated database for performance reasons.
Allowing people to override the repos for reads and writes would not be too hard and would make LuckyRecord more suitable for high performance/high availability requirements.
The text was updated successfully, but these errors were encountered: