Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
feat(cursor): store operation time from initial query
Browse files Browse the repository at this point in the history
Needed for NODE-1520
  • Loading branch information
daprahamian committed Jun 19, 2018
1 parent 33b9e87 commit 55e761e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ Cursor.prototype._find = function(callback) {
// Promote id to long if needed
self.cursorState.cursorId = typeof id === 'number' ? Long.fromNumber(id) : id;
self.cursorState.lastCursorId = self.cursorState.cursorId;
self.cursorState.operationTime = result.documents[0].operationTime;
// If we have a firstBatch set it
if (Array.isArray(result.documents[0].cursor.firstBatch)) {
self.cursorState.documents = result.documents[0].cursor.firstBatch; //.reverse();
Expand Down

0 comments on commit 55e761e

Please sign in to comment.