A string describing the read preference mode (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
A tag set used to target reads to members with the specified tag(s). tagSet is not available if using read preference mode primary.
Additional read preference options
Check if the two ReadPreferences are equivalent
The read preference with which to check equality
Validate if a mode is legal
The string representing the read preference mode.
Indicates that this readPreference needs the "SecondaryOk" bit when sent over the wire
Indicates that this readPreference needs the "secondaryOk" bit when sent over the wire
Return JSON representation
Construct a ReadPreference given an options object.
The options object from which to extract the read preference.
Validate if a mode is legal
The string representing the read preference mode.
Replaces options.readPreference with a ReadPreference instance
Generated using TypeDoc
The ReadPreference class is a class that represents a MongoDB ReadPreference and is used to construct connections.
https://www.mongodb.com/docs/manual/core/read-preference/