From 7f6fb3d64e66c9ab2c81e80e7b08f715e83c5cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Rufine?= Date: Sat, 18 Jul 2020 18:15:57 -0300 Subject: [PATCH 1/2] Add setReadPreference compatibility to Cursor --- lib/cursor.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cursor.js b/lib/cursor.js index 92448be..5beb31f 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -126,6 +126,10 @@ var Cursor = module.exports = function(documents, opts) { rewind: function () { i = 0; }, + + setReadPreference: function (seila) { + return this; + }, size: function(callback) { return this.count(true, callback); From 6f0794f40d9e1fc78cd4e2b5d7116a84bbf2a385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Rufine?= Date: Sat, 18 Jul 2020 18:16:32 -0300 Subject: [PATCH 2/2] Update cursor.js --- lib/cursor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cursor.js b/lib/cursor.js index 5beb31f..6aa518b 100644 --- a/lib/cursor.js +++ b/lib/cursor.js @@ -127,7 +127,7 @@ var Cursor = module.exports = function(documents, opts) { i = 0; }, - setReadPreference: function (seila) { + setReadPreference: function () { return this; },