From a532390f81e35f611fd02ad3d543f4d52217ca3c Mon Sep 17 00:00:00 2001 From: nanalelfe Date: Sun, 14 Aug 2016 06:13:55 -0400 Subject: Fixed signin and signup --- node_modules/mongodb/lib/cursor.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'node_modules/mongodb/lib/cursor.js') diff --git a/node_modules/mongodb/lib/cursor.js b/node_modules/mongodb/lib/cursor.js index 9000847..f62b6d6 100644 --- a/node_modules/mongodb/lib/cursor.js +++ b/node_modules/mongodb/lib/cursor.js @@ -578,6 +578,20 @@ Cursor.prototype.batchSize = function(value) { define.classMethod('batchSize', {callback: false, promise:false, returns: [Cursor]}); +/** + * Set the collation options for the cursor. + * @method + * @param {object} value The cursor collation options + * @throws {MongoError} + * @return {Cursor} + */ +Cursor.prototype.collation = function(value) { + this.s.cmd.collation = value; + return this; +} + +define.classMethod('collation', {callback: false, promise:false, returns: [Cursor]}); + /** * Set the limit for the cursor. * @method @@ -779,7 +793,7 @@ define.classMethod('forEach', {callback: true, promise:false}); Cursor.prototype.setReadPreference = function(r) { if(this.s.state != Cursor.INIT) throw MongoError.create({message: 'cannot change cursor readPreference after cursor has been accessed', driver:true}); if(r instanceof ReadPreference) { - this.s.options.readPreference = new CoreReadPreference(r.mode, r.tags); + this.s.options.readPreference = new CoreReadPreference(r.mode, r.tags, {maxStalenessMS: r.maxStalenessMS}); } else if(typeof r == 'string'){ this.s.options.readPreference = new CoreReadPreference(r); } else if(r instanceof CoreReadPreference) { @@ -879,7 +893,7 @@ define.classMethod('toArray', {callback: true, promise:true}); /** * Get the count of documents for this cursor * @method - * @param {boolean} applySkipLimit Should the count command apply limit and skip settings on the cursor or in the passed in options. + * @param {boolean} [applySkipLimit=true] Should the count command apply limit and skip settings on the cursor or in the passed in options. * @param {object} [options=null] Optional settings. * @param {number} [options.skip=null] The number of documents to skip. * @param {number} [options.limit=null] The maximum amounts to count before aborting. -- cgit v1.2.3