Merge pull request #21490 from mcortesi/master

[mongodb] Include `bufferMaxEntries` as a MongoClientOption
This commit is contained in:
Benjamin Lichtman 2017-11-22 12:55:16 -05:00 committed by GitHub
commit 70688d643c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -5,6 +5,7 @@
// Gady Piazza <https://github.com/kikar>
// Jason Dreyzehner <https://github.com/bitjson>
// Gaurav Lahoti <https://github.com/dante-101>
// Mariano Cortesi <https://github.com/dante-101>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@ -146,6 +147,9 @@ export interface DbCreateOptions {
promiseLibrary?: Object;
// https://docs.mongodb.com/manual/reference/read-concern/#read-concern
readConcern?: { level?: Object };
// 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.
bufferMaxEntries?: number;
}
// http://mongodb.github.io/node-mongodb-native/2.2/api/Server.html

View File

@ -3,7 +3,7 @@ import mongodb = require('mongodb');
var MongoClient = mongodb.MongoClient;
var format = require('util').format;
let options = {
let options: mongodb.MongoClientOptions = {
authSource : ' ',
w : 1,
wtimeout : 300,