@@ -296,7 +296,7 @@ export class Collection<TSchema extends Document = Document> {
296
296
}
297
297
298
298
return executeOperation (
299
- getTopology ( this ) ,
299
+ this ,
300
300
new InsertOneOperation (
301
301
this as TODO_NODE_3286 ,
302
302
doc ,
@@ -338,7 +338,7 @@ export class Collection<TSchema extends Document = Document> {
338
338
options = options ? Object . assign ( { } , options ) : { ordered : true } ;
339
339
340
340
return executeOperation (
341
- getTopology ( this ) ,
341
+ this ,
342
342
new InsertManyOperation (
343
343
this as TODO_NODE_3286 ,
344
344
docs ,
@@ -406,7 +406,7 @@ export class Collection<TSchema extends Document = Document> {
406
406
}
407
407
408
408
return executeOperation (
409
- getTopology ( this ) ,
409
+ this ,
410
410
new BulkWriteOperation (
411
411
this as TODO_NODE_3286 ,
412
412
operations as TODO_NODE_3286 ,
@@ -453,7 +453,7 @@ export class Collection<TSchema extends Document = Document> {
453
453
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
454
454
455
455
return executeOperation (
456
- getTopology ( this ) ,
456
+ this ,
457
457
new UpdateOneOperation (
458
458
this as TODO_NODE_3286 ,
459
459
filter ,
@@ -501,7 +501,7 @@ export class Collection<TSchema extends Document = Document> {
501
501
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
502
502
503
503
return executeOperation (
504
- getTopology ( this ) ,
504
+ this ,
505
505
new ReplaceOneOperation (
506
506
this as TODO_NODE_3286 ,
507
507
filter ,
@@ -549,7 +549,7 @@ export class Collection<TSchema extends Document = Document> {
549
549
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
550
550
551
551
return executeOperation (
552
- getTopology ( this ) ,
552
+ this ,
553
553
new UpdateManyOperation (
554
554
this as TODO_NODE_3286 ,
555
555
filter ,
@@ -583,7 +583,7 @@ export class Collection<TSchema extends Document = Document> {
583
583
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
584
584
585
585
return executeOperation (
586
- getTopology ( this ) ,
586
+ this ,
587
587
new DeleteOneOperation ( this as TODO_NODE_3286 , filter , resolveOptions ( this , options ) ) ,
588
588
callback
589
589
) ;
@@ -623,7 +623,7 @@ export class Collection<TSchema extends Document = Document> {
623
623
}
624
624
625
625
return executeOperation (
626
- getTopology ( this ) ,
626
+ this ,
627
627
new DeleteManyOperation ( this as TODO_NODE_3286 , filter , resolveOptions ( this , options ) ) ,
628
628
callback
629
629
) ;
@@ -652,7 +652,7 @@ export class Collection<TSchema extends Document = Document> {
652
652
653
653
// Intentionally, we do not inherit options from parent for this operation.
654
654
return executeOperation (
655
- getTopology ( this ) ,
655
+ this ,
656
656
new RenameOperation ( this as TODO_NODE_3286 , newName , {
657
657
...options ,
658
658
readPreference : ReadPreference . PRIMARY
@@ -679,7 +679,7 @@ export class Collection<TSchema extends Document = Document> {
679
679
options = options ?? { } ;
680
680
681
681
return executeOperation (
682
- getTopology ( this ) ,
682
+ this ,
683
683
new DropCollectionOperation ( this . s . db , this . collectionName , options ) ,
684
684
callback
685
685
) ;
@@ -783,7 +783,7 @@ export class Collection<TSchema extends Document = Document> {
783
783
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
784
784
785
785
return executeOperation (
786
- getTopology ( this ) ,
786
+ this ,
787
787
new OptionsOperation ( this as TODO_NODE_3286 , resolveOptions ( this , options ) ) ,
788
788
callback
789
789
) ;
@@ -806,7 +806,7 @@ export class Collection<TSchema extends Document = Document> {
806
806
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
807
807
808
808
return executeOperation (
809
- getTopology ( this ) ,
809
+ this ,
810
810
new IsCappedOperation ( this as TODO_NODE_3286 , resolveOptions ( this , options ) ) ,
811
811
callback
812
812
) ;
@@ -857,7 +857,7 @@ export class Collection<TSchema extends Document = Document> {
857
857
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
858
858
859
859
return executeOperation (
860
- getTopology ( this ) ,
860
+ this ,
861
861
new CreateIndexOperation (
862
862
this as TODO_NODE_3286 ,
863
863
this . collectionName ,
@@ -918,7 +918,7 @@ export class Collection<TSchema extends Document = Document> {
918
918
if ( typeof options . maxTimeMS !== 'number' ) delete options . maxTimeMS ;
919
919
920
920
return executeOperation (
921
- getTopology ( this ) ,
921
+ this ,
922
922
new CreateIndexesOperation (
923
923
this as TODO_NODE_3286 ,
924
924
this . collectionName ,
@@ -952,7 +952,7 @@ export class Collection<TSchema extends Document = Document> {
952
952
options . readPreference = ReadPreference . primary ;
953
953
954
954
return executeOperation (
955
- getTopology ( this ) ,
955
+ this ,
956
956
new DropIndexOperation ( this as TODO_NODE_3286 , indexName , options ) ,
957
957
callback
958
958
) ;
@@ -975,7 +975,7 @@ export class Collection<TSchema extends Document = Document> {
975
975
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
976
976
977
977
return executeOperation (
978
- getTopology ( this ) ,
978
+ this ,
979
979
new DropIndexesOperation ( this as TODO_NODE_3286 , resolveOptions ( this , options ) ) ,
980
980
callback
981
981
) ;
@@ -1013,7 +1013,7 @@ export class Collection<TSchema extends Document = Document> {
1013
1013
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1014
1014
1015
1015
return executeOperation (
1016
- getTopology ( this ) ,
1016
+ this ,
1017
1017
new IndexExistsOperation ( this as TODO_NODE_3286 , indexes , resolveOptions ( this , options ) ) ,
1018
1018
callback
1019
1019
) ;
@@ -1036,7 +1036,7 @@ export class Collection<TSchema extends Document = Document> {
1036
1036
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1037
1037
1038
1038
return executeOperation (
1039
- getTopology ( this ) ,
1039
+ this ,
1040
1040
new IndexInformationOperation ( this . s . db , this . collectionName , resolveOptions ( this , options ) ) ,
1041
1041
callback
1042
1042
) ;
@@ -1058,7 +1058,7 @@ export class Collection<TSchema extends Document = Document> {
1058
1058
) : Promise < number > | void {
1059
1059
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1060
1060
return executeOperation (
1061
- getTopology ( this ) ,
1061
+ this ,
1062
1062
new EstimatedDocumentCountOperation ( this as TODO_NODE_3286 , resolveOptions ( this , options ) ) ,
1063
1063
callback
1064
1064
) ;
@@ -1118,7 +1118,7 @@ export class Collection<TSchema extends Document = Document> {
1118
1118
1119
1119
filter ??= { } ;
1120
1120
return executeOperation (
1121
- getTopology ( this ) ,
1121
+ this ,
1122
1122
new CountDocumentsOperation (
1123
1123
this as TODO_NODE_3286 ,
1124
1124
filter as Document ,
@@ -1193,7 +1193,7 @@ export class Collection<TSchema extends Document = Document> {
1193
1193
1194
1194
filter ??= { } ;
1195
1195
return executeOperation (
1196
- getTopology ( this ) ,
1196
+ this ,
1197
1197
new DistinctOperation (
1198
1198
this as TODO_NODE_3286 ,
1199
1199
key as TODO_NODE_3286 ,
@@ -1221,7 +1221,7 @@ export class Collection<TSchema extends Document = Document> {
1221
1221
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1222
1222
1223
1223
return executeOperation (
1224
- getTopology ( this ) ,
1224
+ this ,
1225
1225
new IndexesOperation ( this as TODO_NODE_3286 , resolveOptions ( this , options ) ) ,
1226
1226
callback
1227
1227
) ;
@@ -1245,7 +1245,7 @@ export class Collection<TSchema extends Document = Document> {
1245
1245
options = options ?? { } ;
1246
1246
1247
1247
return executeOperation (
1248
- getTopology ( this ) ,
1248
+ this ,
1249
1249
new CollStatsOperation ( this as TODO_NODE_3286 , options ) ,
1250
1250
callback
1251
1251
) ;
@@ -1277,7 +1277,7 @@ export class Collection<TSchema extends Document = Document> {
1277
1277
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1278
1278
1279
1279
return executeOperation (
1280
- getTopology ( this ) ,
1280
+ this ,
1281
1281
new FindOneAndDeleteOperation (
1282
1282
this as TODO_NODE_3286 ,
1283
1283
filter ,
@@ -1324,7 +1324,7 @@ export class Collection<TSchema extends Document = Document> {
1324
1324
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1325
1325
1326
1326
return executeOperation (
1327
- getTopology ( this ) ,
1327
+ this ,
1328
1328
new FindOneAndReplaceOperation (
1329
1329
this as TODO_NODE_3286 ,
1330
1330
filter ,
@@ -1372,7 +1372,7 @@ export class Collection<TSchema extends Document = Document> {
1372
1372
if ( typeof options === 'function' ) ( callback = options ) , ( options = { } ) ;
1373
1373
1374
1374
return executeOperation (
1375
- getTopology ( this ) ,
1375
+ this ,
1376
1376
new FindOneAndUpdateOperation (
1377
1377
this as TODO_NODE_3286 ,
1378
1378
filter ,
@@ -1495,7 +1495,7 @@ export class Collection<TSchema extends Document = Document> {
1495
1495
}
1496
1496
1497
1497
return executeOperation (
1498
- getTopology ( this ) ,
1498
+ this ,
1499
1499
new MapReduceOperation (
1500
1500
this as TODO_NODE_3286 ,
1501
1501
map ,
@@ -1636,7 +1636,7 @@ export class Collection<TSchema extends Document = Document> {
1636
1636
1637
1637
filter ??= { } ;
1638
1638
return executeOperation (
1639
- getTopology ( this ) ,
1639
+ this ,
1640
1640
new CountOperation (
1641
1641
MongoDBNamespace . fromString ( this . namespace ) ,
1642
1642
filter ,
0 commit comments