Skip to content

Commit 24155e7

Browse files
committed
feat: deprecate oplogReplay for find commands
NODE-2423
1 parent 8b8a20c commit 24155e7

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/collection.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Object.defineProperty(Collection.prototype, 'hint', {
278278
}
279279
});
280280

281-
const DEPRECATED_FIND_OPTIONS = ['maxScan', 'fields', 'snapshot'];
281+
const DEPRECATED_FIND_OPTIONS = ['maxScan', 'fields', 'snapshot', 'oplogReplay'];
282282

283283
/**
284284
* Creates a cursor for a query that can be used to iterate over results from MongoDB

lib/cursor.js

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ const fields = ['numberOfRetries', 'tailableRetryInterval'];
8585
* collection.find({}).filter({a:1}) // Set query on the cursor
8686
* collection.find({}).comment('add a comment') // Add a comment to the query, allowing to correlate queries
8787
* collection.find({}).addCursorFlag('tailable', true) // Set cursor as tailable
88-
* collection.find({}).addCursorFlag('oplogReplay', true) // Set cursor as oplogReplay
8988
* collection.find({}).addCursorFlag('noCursorTimeout', true) // Set cursor as noCursorTimeout
9089
* collection.find({}).addCursorFlag('awaitData', true) // Set cursor as awaitData
9190
* collection.find({}).addCursorFlag('partial', true) // Set cursor as partial

0 commit comments

Comments
 (0)