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

Motor get_database method kwargs support #70

Open
Olegt0rr opened this issue Dec 11, 2020 · 2 comments
Open

Motor get_database method kwargs support #70

Olegt0rr opened this issue Dec 11, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Olegt0rr
Copy link
Contributor

Motor supports additional options for databases

def get_database(self, name=None, codec_options=None, read_preference=None,
                     write_concern=None, read_concern=None):
    ...

I always use feature with setting read_preference=ReadPreference.SECONDARY_PREFERRED.
It's really helps with highload apps.

Why don't you pass this options to AIOEngine init?

@art049
Copy link
Owner

art049 commented Dec 11, 2020

Thanks, yes support of additional preferences was totally planned. It should be included as well in the find/save method as well but setting it globally on the engine first is totally ok to me !

@robert-nash
Copy link

This looks really useful for me to read all dates as UTC dates. I wondered if there is another solution which has made this PR redundant or if there is anything I can do to help move this forward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants