Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/operations/find.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export interface FindOptions<TSchema extends Document = Document> extends Comman
showRecordId?: boolean;
/** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */
let?: Document;
/**
* Option to enable an optimized code path for queries looking for a particular range of `ts` values in the oplog. Requires `tailable` to be true.
* @deprecated Starting from MongoDB 4.4 this flag is not needed and will be ignored.
*/
oplogReplay?: boolean;
}

const SUPPORTS_WRITE_CONCERN_AND_COLLATION = 5;
Expand Down Expand Up @@ -242,6 +247,10 @@ function makeFindCommand(ns: MongoDBNamespace, filter: Document, options: FindOp
findCommand.tailable = options.tailable;
}

if (typeof options.oplogReplay === 'boolean') {
findCommand.oplogReplay = options.oplogReplay;
}

if (typeof options.timeout === 'boolean') {
findCommand.noCursorTimeout = !options.timeout;
} else if (typeof options.noCursorTimeout === 'boolean') {
Expand Down