MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / read_pref_mode_from_name

Function read_pref_mode_from_name

pymongo/read_preferences.py:609–611  ·  view source on GitHub ↗

Get the read preference mode from mongos/uri name.

(name: str)

Source from the content-addressed store, hash-verified

607
608
609def read_pref_mode_from_name(name: str) -> int:
610 """Get the read preference mode from mongos/uri name."""
611 return _MONGOS_MODES.index(name)
612
613
614class MovingAverage:

Callers 5

testFunction · 0.90
testFunction · 0.90
testFunction · 0.90
testFunction · 0.90
_parse_read_preferenceFunction · 0.90

Calls 1

indexMethod · 0.80

Tested by 4

testFunction · 0.72
testFunction · 0.72
testFunction · 0.72
testFunction · 0.72