diff --git a/lib/mongo_client.js b/lib/mongo_client.js index eea5c4549c..db19e70893 100644 --- a/lib/mongo_client.js +++ b/lib/mongo_client.js @@ -143,6 +143,9 @@ const validOptions = require('./operations/connect').validOptions; * @param {number} [options.minSize] If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections * @param {boolean} [options.useNewUrlParser=true] Determines whether or not to use the new url parser. Enables the new, spec-compliant, url parser shipped in the core driver. This url parser fixes a number of problems with the original parser, and aims to outright replace that parser in the near future. Defaults to true, and must be explicitly set to false to use the legacy url parser. * @param {boolean} [options.useUnifiedTopology] Enables the new unified topology layer + * @param {Number} [options.localThresholdMS=15] **Only applies to the unified topology** The size of the latency window for selecting among multiple suitable servers + * @param {Number} [options.serverSelectionTimeoutMS=30000] **Only applies to the unified topology** How long to block for server selection before throwing an error + * @param {Number} [options.heartbeatFrequencyMS=10000] **Only applies to the unified topology** The frequency with which topology updates are scheduled * @param {AutoEncrypter~AutoEncryptionOptions} [options.autoEncryption] Optionally enable client side auto encryption * @param {DriverInfoOptions} [options.driverInfo] Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver * @param {MongoClient~connectCallback} [callback] The command result callback @@ -344,7 +347,7 @@ MongoClient.prototype.isConnected = function(options) { * @param {object} [options] Optional settings * @param {number} [options.poolSize=5] The maximum size of the individual server pool * @param {boolean} [options.ssl=false] Enable SSL connection. *deprecated* use `tls` variants - * @param {boolean} [options.sslValidate=false] Validate mongod server certificate against Certificate Authority *deprecated* use `tls` variants + * @param {boolean} [options.sslValidate=false] Validate mongod server certificate against Certificate Authority * @param {buffer} [options.sslCA=undefined] SSL Certificate store binary buffer *deprecated* use `tls` variants * @param {buffer} [options.sslCert=undefined] SSL Certificate binary buffer *deprecated* use `tls` variants * @param {buffer} [options.sslKey=undefined] SSL Key file binary buffer *deprecated* use `tls` variants @@ -361,7 +364,7 @@ MongoClient.prototype.isConnected = function(options) { * @param {boolean} [options.autoReconnect=true] Enable autoReconnect for single server instances * @param {boolean} [options.noDelay=true] TCP Connection no delay * @param {boolean} [options.keepAlive=true] TCP Connection keep alive enabled - * @param {boolean} [options.keepAliveInitialDelay=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket + * @param {number} [options.keepAliveInitialDelay=30000] The number of milliseconds to wait before initiating keepAlive on the TCP socket * @param {number} [options.connectTimeoutMS=10000] How long to wait for a connection to be established before timing out * @param {number} [options.socketTimeoutMS=360000] How long a send or receive on a socket can take before timing out * @param {number} [options.family] Version of IP stack. Can be 4, 6 or null (default). @@ -405,7 +408,15 @@ MongoClient.prototype.isConnected = function(options) { * @param {array} [options.readPreferenceTags] Read preference tags * @param {number} [options.numberOfRetries=5] The number of retries for a tailable cursor * @param {boolean} [options.auto_reconnect=true] Enable auto reconnecting for single server instances + * @param {boolean} [options.monitorCommands=false] Enable command monitoring for this client * @param {number} [options.minSize] If present, the connection pool will be initialized with minSize connections, and will never dip below minSize connections + * @param {boolean} [options.useNewUrlParser=true] Determines whether or not to use the new url parser. Enables the new, spec-compliant, url parser shipped in the core driver. This url parser fixes a number of problems with the original parser, and aims to outright replace that parser in the near future. Defaults to true, and must be explicitly set to false to use the legacy url parser. + * @param {boolean} [options.useUnifiedTopology] Enables the new unified topology layer + * @param {Number} [options.localThresholdMS=15] **Only applies to the unified topology** The size of the latency window for selecting among multiple suitable servers + * @param {Number} [options.serverSelectionTimeoutMS=30000] **Only applies to the unified topology** How long to block for server selection before throwing an error + * @param {Number} [options.heartbeatFrequencyMS=10000] **Only applies to the unified topology** The frequency with which topology updates are scheduled + * @param {AutoEncrypter~AutoEncryptionOptions} [options.autoEncryption] Optionally enable client side auto encryption + * @param {DriverInfoOptions} [options.driverInfo] Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver * @param {MongoClient~connectCallback} [callback] The command result callback * @return {Promise} returns Promise if no callback passed */