@@ -14,11 +14,9 @@ import type { CollationOptions, CommandOperationOptions } from '../operations/co
14
14
import { DeleteOperation , type DeleteStatement , makeDeleteStatement } from '../operations/delete' ;
15
15
import { executeOperation } from '../operations/execute_operation' ;
16
16
import { InsertOperation } from '../operations/insert' ;
17
- import { AbstractOperation , type Hint } from '../operations/operation' ;
17
+ import { type Hint } from '../operations/operation' ;
18
18
import { makeUpdateStatement , UpdateOperation , type UpdateStatement } from '../operations/update' ;
19
- import type { Server } from '../sdam/server' ;
20
19
import type { Topology } from '../sdam/topology' ;
21
- import type { ClientSession } from '../sessions' ;
22
20
import { type Sort } from '../sort' ;
23
21
import { TimeoutContext } from '../timeout' ;
24
22
import {
@@ -854,40 +852,6 @@ export interface BulkWriteOptions extends CommandOperationOptions {
854
852
timeoutContext ?: TimeoutContext ;
855
853
}
856
854
857
- /**
858
- * TODO(NODE-4063)
859
- * BulkWrites merge complexity is implemented in executeCommands
860
- * This provides a vehicle to treat bulkOperations like any other operation (hence "shim")
861
- * We would like this logic to simply live inside the BulkWriteOperation class
862
- * @internal
863
- */
864
- export class BulkWriteShimOperation extends AbstractOperation {
865
- bulkOperation : BulkOperationBase ;
866
- constructor ( bulkOperation : BulkOperationBase , options : BulkWriteOptions ) {
867
- super ( options ) ;
868
- this . bulkOperation = bulkOperation ;
869
- }
870
-
871
- get commandName ( ) : string {
872
- return 'bulkWrite' as const ;
873
- }
874
-
875
- async execute (
876
- _server : Server ,
877
- session : ClientSession | undefined ,
878
- timeoutContext : TimeoutContext
879
- ) : Promise < any > {
880
- if ( this . options . session == null ) {
881
- // An implicit session could have been created by 'executeOperation'
882
- // So if we stick it on finalOptions here, each bulk operation
883
- // will use this same session, it'll be passed in the same way
884
- // an explicit session would be
885
- this . options . session = session ;
886
- }
887
- return await executeCommands ( this . bulkOperation , { ...this . options , timeoutContext } ) ;
888
- }
889
- }
890
-
891
855
/** @public */
892
856
export abstract class BulkOperationBase {
893
857
isOrdered : boolean ;
0 commit comments