We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a5e0f6 commit 438539eCopy full SHA for 438539e
pymongo/database.py
@@ -162,11 +162,11 @@ def with_options(
162
>>> db1.read_preference
163
Primary()
164
>>> from pymongo import ReadPreference
165
- >>> db2 = db1.with_options(read_preference=ReadPreference.SECONDARY)
+ >>> db2 = db1.with_options(read_preference=Secondary([{'node': 'analytics'}]))
166
167
168
>>> db2.read_preference
169
- Secondary(tag_sets=None)
+ Secondary(tag_sets=[{'node': 'analytics'}], max_staleness=-1, hedge=None)
170
171
:Parameters:
172
- `codec_options` (optional): An instance of
0 commit comments