这是indexloc提供的服务,不要输入任何密码
Skip to content

Read/Write database selection #1393

@devon2018

Description

@devon2018

Is your feature request related to a problem? Please describe.
I need to implement read and write replicas of my database in my app, I know I can pass the db to the model query directly using use_db.

Describe the solution you'd like
It would be great if when creating my OrmarConfig I could define a read only database that will get used for all read operations and the default database will be used for write, what would be even better.

Describe alternatives you've considered
using the use_db function but seems a bit messy, this is a config that a lot of other frameworks provide so would be good to consider for a future release.

Additional context
Not that I can think of.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions