A string describing the read preference mode (primary|primaryPreferred|secondary|secondaryPreferred|nearest)
Optional
tags: mongoose.mongo.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.
Optional
Optional
options: ReadPreferenceOptionsAdditional read preference options
Optional
Optional
hedgeOptional
maxOptional
minOptional
tagsStatic
NEARESTStatic
PRIMARYStatic
PRIMARY_Static
SECONDARYStatic
SECONDARY_Static
nearestStatic
primaryStatic
primaryStatic
secondaryStatic
secondaryCheck if the two ReadPreferences are equivalent
The read preference with which to check equality
Static
fromConstruct a ReadPreference given an options object.
Optional
options: ReadPreferenceFromOptionsThe options object from which to extract the read preference.
Optional
Static
fromStatic
isStatic
translateReplaces 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.
See
https://www.mongodb.com/docs/manual/core/read-preference/