@@ -56,9 +56,6 @@ Connection Options
56
56
------------------
57
57
58
58
The following sections describe the connection options available in {+driver-short+}.
59
- If a ``Mongo::Client`` parameter maps to more than one
60
- option in the connection string, the **Connection URI Example** shows all
61
- relevant options.
62
59
63
60
Network Compression
64
61
~~~~~~~~~~~~~~~~~~~
@@ -160,14 +157,14 @@ Server Selection
160
157
|
161
158
| **Data Type**: ``ServerSelector``
162
159
| **Default**: none
163
- | **Client Example**: ``server_selector: { mode: :secondary_preferred }`` NOT SURE ABOUT THIS ONE
160
+ | **Client Example**: ``server_selector: { mode: :secondary_preferred }``
164
161
| **Connection URI Example**: N/A
165
162
166
163
* - **:server_selection_timeout**
167
164
- | The number of seconds to wait for an appropriate server to
168
165
| be selected for an operation to be executed before raising an exception.
169
166
|
170
- | **Data Type**:
167
+ | **Data Type**: ``Integer``
171
168
| **Default**: ``30``
172
169
| **Client Example**: ``server_selection_timeout: 30``
173
170
| **Connection URI Example**: ``serverSelectionTimeoutMS=30000``
@@ -186,23 +183,19 @@ Authentication
186
183
- | The mechanism that the {+driver-short+} uses to authenticate the application.
187
184
|
188
185
| **Data Type**: ``Symbol``
189
- | **Default**: If user credentials are not supplied, ``nil``. If user credentials
190
- | are supplied, the default depends on server version.
191
- | MongoDB 4.0 and later: ``:scram256`` if user credentials correspond
192
- | to a user which supports SCRAM-SHA-256 authentication, otherwise
193
- | ``:scram``.
194
- | MongoDB 3.0-3.6: ``:scram``.
195
- | MongoDB 2.6: ``:mongodb_cr``
196
- | **Client Example**: ``auth_mech: :scram256`` UNSUREEEEEE
186
+ | **Default**: ``nil`` if user credentials are not supplied.
187
+ | ``:scram256`` when connecting to MongoDB v4.0 or later.
188
+ | **Client Example**: ``auth_mech: :scram256``
197
189
| **Connection URI Example**: ``authMechanism=SCRAM-SHA-256``
198
190
199
191
* - **:auth_mech_properties**
200
192
- | Options specific to the authentication mechanism. This option
201
193
| isn't needed for all authentication mechanisms.
202
194
|
203
195
| **Data Type**: ``Hash``
204
- | **Default**: When you use the GSSAPI authentication mechanism, the default properties
205
- | are ``{service_name: "mongodb"}``. Otherwise the default is ``nil``.
196
+ | **Default**: When you use the GSSAPI authentication mechanism,
197
+ | the default properties are ``{service_name: "mongodb"}``.
198
+ | Otherwise, the default is ``nil``.
206
199
| **Client Example**: ``auth_mech_properties: {aws_session_token: '12345'}``
207
200
| **Connection URI Example**: ``authMechanismProperties=AWS_SESSION_TOKEN:12345``
208
201
@@ -215,8 +208,8 @@ Authentication
215
208
| **Connection URI Example**: ``authSource=admin``
216
209
217
210
* - **:user**
218
- - | The username for authentication. When this option is included in a
219
- | connection URI, you must percent-encode it.
211
+ - | The username for authentication. When this option is included
212
+ | in a connection URI, you must percent-encode it.
220
213
|
221
214
| **Data Type**: ``String``
222
215
| **Default**: none
@@ -260,8 +253,7 @@ Read and Write Operations
260
253
261
254
* - **:read**
262
255
- | The read preference options. For more information,
263
- | see :manual:`Read Preference </core/read-preference/>` in the
264
- | Server manual.
256
+ | see :manual:`Read Preference </core/read-preference/>` in the Server manual.
265
257
|
266
258
| **Data Type**: ``Hash``
267
259
| **Default**: ``{ :mode: :primary }``
@@ -270,8 +262,7 @@ Read and Write Operations
270
262
271
263
* - **:read_concern**
272
264
- | Specifies the read concern options. For more information, see
273
- | :manual:`Read Concern </reference/read-concern/>` in the Server
274
- | manual.
265
+ | :manual:`Read Concern </reference/read-concern/>` in the Server manual.
275
266
|
276
267
| **Data Type**: ``Hash``
277
268
| **Default**: none
0 commit comments