You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -581,7 +581,7 @@ export abstract class AbstractCursor<
581
581
* @param value - Number of milliseconds to wait before aborting the query.
582
582
*/
583
583
maxTimeMS(value: number): this {
584
-
assertUninitialized(this);
584
+
this.throwIfInitialized();
585
585
if(typeofvalue!=='number'){
586
586
thrownewMongoInvalidArgumentError('Argument for maxTimeMS must be a number');
587
587
}
@@ -596,7 +596,7 @@ export abstract class AbstractCursor<
596
596
* @param value - The number of documents to return per batch. See {@link https://www.mongodb.com/docs/manual/reference/command/find/|find command documentation}.
597
597
*/
598
598
batchSize(value: number): this {
599
-
assertUninitialized(this);
599
+
this.throwIfInitialized();
600
600
if(this[kOptions].tailable){
601
601
thrownewMongoTailableCursorError('Tailable cursor does not support batchSize');
602
602
}
@@ -802,8 +802,33 @@ export abstract class AbstractCursor<
* @param min - Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order.
* @param max - Specify a $max value to specify the exclusive upper bound for a specific index in order to constrain the results of find(). The $max specifies the upper bound for all keys of a specific index in order.
* @param value - The $showDiskLoc option has now been deprecated and replaced with the showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find.
0 commit comments