You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**promoteValues**| Server, ReplicaSet, Mongos | boolean | true | Promotes BSON values to native types where possible, set to false to only receive wrapper types. |
68
+
|**domainsEnabled**| Server, ReplicaSet, Mongos | boolean | false | Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit. |
66
69
|**bufferMaxEntries**| Server, ReplicaSet, Mongos | integer | -1 | Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited. |
|**pkFactory**| Server, ReplicaSet, Mongos | object | null | A primary key factory object for generation of custom _id keys. |
69
72
|**promiseLibrary**| Server, ReplicaSet, Mongos | object | null | A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible. |
70
73
|**readConcern**| Server, ReplicaSet, Mongos | object | null | Specify a read concern for the collection. (only MongoDB 3.2 or higher supported). |
71
74
|**maxStalenessSeconds**| Replicaset | number | null | Specify a maxStalenessSeconds value for secondary reads, minimum is 90 seconds |
75
+
|**loggerLevel**| Server, Replicaset, Mongos | string | null | Specify the log level used by the driver logger (error/warn/info/debug) |
76
+
|**logger**| Server, Replicaset, Mongos | object | null | Specify a customer logger mechanism, can be used to log using your app level logger |
72
77
# Ensure you connection string is valid for Replica Sets
73
78
74
79
The connection string passed to the driver must use the fully qualified host names for the servers as set in the replicaset config. Given the following configuration settings for your replicaset.
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
90
+
* @param {boolean} [options.autoReconnect=true] Enable autoReconnect for single server instances
91
+
* @param {boolean} [options.noDelay=true] TCP Connection no delay
92
+
* @param {boolean} [options.keepAlive=0] The number of milliseconds to wait before initiating keepAlive on the TCP socket.
* @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
114
+
* @param {number} [options.bufferMaxEntries=-1] Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited.
* @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
117
+
* @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
58
118
* @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
119
+
* @param {object} [options.readConcern=null] Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)
120
+
* @param {object} [options.readConcern.level='local'] Specify a read concern level for the collection operations, one of [local|majority]. (only MongoDB 3.2 or higher supported)
121
+
* @param {number} [options.maxStalenessSeconds=undefined] The max staleness to secondary reads (values under 10 seconds cannot be guaranteed);
122
+
* @param {string} [options.loggerLevel=undefined] The logging level (error/warn/info/debug)
* @param {boolean|function} [options.checkServerIdentity=true] Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function.
150
+
* @param {boolean} [options.autoReconnect=true] Enable autoReconnect for single server instances
151
+
* @param {boolean} [options.noDelay=true] TCP Connection no delay
152
+
* @param {boolean} [options.keepAlive=0] The number of milliseconds to wait before initiating keepAlive on the TCP socket.
* @param {boolean} [options.promoteValues=true] Promotes BSON values to native types where possible, set to false to only receive wrapper types.
174
+
* @param {number} [options.bufferMaxEntries=-1] Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited.
* @param {boolean} [options.domainsEnabled=false] Enable the wrapping of the callback in the current domain, disabled by default to avoid perf hit.
177
+
* @param {object} [options.pkFactory=null] A primary key factory object for generation of custom _id keys.
83
178
* @param {object} [options.promiseLibrary=null] A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible
179
+
* @param {object} [options.readConcern=null] Specify a read concern for the collection. (only MongoDB 3.2 or higher supported)
180
+
* @param {object} [options.readConcern.level='local'] Specify a read concern level for the collection operations, one of [local|majority]. (only MongoDB 3.2 or higher supported)
181
+
* @param {number} [options.maxStalenessSeconds=undefined] The max staleness to secondary reads (values under 10 seconds cannot be guaranteed);
182
+
* @param {string} [options.loggerLevel=undefined] The logging level (error/warn/info/debug)
0 commit comments