aboutsummaryrefslogtreecommitdiff
path: root/node_modules/mongodb/lib/topology_base.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/mongodb/lib/topology_base.js')
-rw-r--r--node_modules/mongodb/lib/topology_base.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/mongodb/lib/topology_base.js b/node_modules/mongodb/lib/topology_base.js
index cad8d85..2f5ac1f 100644
--- a/node_modules/mongodb/lib/topology_base.js
+++ b/node_modules/mongodb/lib/topology_base.js
@@ -113,6 +113,8 @@ var ServerCapabilities = function(ismaster) {
var listCollections = false;
var listIndexes = false;
var maxNumberOfDocsInBatch = ismaster.maxWriteBatchSize || 1000;
+ var commandsTakeWriteConcern = false;
+ var commandsTakeCollation = false;
if(ismaster.minWireVersion >= 0) {
textSearch = true;
@@ -132,6 +134,11 @@ var ServerCapabilities = function(ismaster) {
listIndexes = true;
}
+ if(ismaster.maxWireVersion >= 5) {
+ commandsTakeWriteConcern = true;
+ commandsTakeCollation = true;
+ }
+
// If no min or max wire version set to 0
if(ismaster.minWireVersion == null) {
ismaster.minWireVersion = 0;
@@ -151,6 +158,8 @@ var ServerCapabilities = function(ismaster) {
setup_get_property(this, "minWireVersion", ismaster.minWireVersion);
setup_get_property(this, "maxWireVersion", ismaster.maxWireVersion);
setup_get_property(this, "maxNumberOfDocsInBatch", maxNumberOfDocsInBatch);
+ setup_get_property(this, "commandsTakeWriteConcern", commandsTakeWriteConcern);
+ setup_get_property(this, "commandsTakeCollation", commandsTakeCollation);
}
exports.Store = Store;