diff options
Diffstat (limited to 'src/mongo/shell/mongo.js')
-rw-r--r-- | src/mongo/shell/mongo.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/mongo/shell/mongo.js b/src/mongo/shell/mongo.js index ecd09f6bab3..bd79191af76 100644 --- a/src/mongo/shell/mongo.js +++ b/src/mongo/shell/mongo.js @@ -33,13 +33,25 @@ if (typeof mongoInject == "function") { } Mongo.prototype.setSlaveOk = function(value) { + print( + "WARNING: setSlaveOk() is deprecated and may be removed in the next major release. Please use setSecondaryOk() instead."); + this.setSecondaryOk(value); +}; + +Mongo.prototype.getSlaveOk = function() { + print( + "WARNING: getSlaveOk() is deprecated and may be removed in the next major release. Please use getSecondaryOk() instead."); + return this.getSecondaryOk(); +}; + +Mongo.prototype.setSecondaryOk = function(value) { if (value == undefined) value = true; - this.slaveOk = value; + this.secondaryOk = value; }; -Mongo.prototype.getSlaveOk = function() { - return this.slaveOk || false; +Mongo.prototype.getSecondaryOk = function() { + return this.secondaryOk || false; }; Mongo.prototype.getDB = function(name) { |