A string describing the read preference mode (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
Optionaltags: TagSet[]
A tag set used to target reads to members with the specified tag(s). tagSet is not available if using read preference mode primary.
Optionaloptions: ReadPreferenceOptions
Additional read preference options
OptionalhedgeOptionalmaxOptionaltagsStaticnearestStaticNEARESTStaticprimaryStaticPRIMARYStaticPRIMARY_StaticprimaryStaticsecondaryStaticSECONDARYStaticSECONDARY_StaticsecondaryCheck if the two ReadPreferences are equivalent
The read preference with which to check equality
StaticfromConstruct a ReadPreference given an options object.
Optionaloptions: ReadPreferenceFromOptions
The options object from which to extract the read preference.
StaticfromStaticisStatictranslateReplaces options.readPreference with a ReadPreference instance
The ReadPreference class is a class that represents a MongoDB ReadPreference and is used to construct connections.
See
/v8.3/core/read-preference/