odmantic
odmantic copied to clipboard
Motor `get_database` method kwargs support
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?
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 !