@@ -14,11 +14,9 @@ import type { CollationOptions, CommandOperationOptions } from '../operations/co
1414import { DeleteOperation , type DeleteStatement , makeDeleteStatement } from '../operations/delete' ;
1515import { executeOperation } from '../operations/execute_operation' ;
1616import { InsertOperation } from '../operations/insert' ;
17- import { AbstractOperation , type Hint } from '../operations/operation' ;
17+ import { type Hint } from '../operations/operation' ;
1818import { makeUpdateStatement , UpdateOperation , type UpdateStatement } from '../operations/update' ;
19- import type { Server } from '../sdam/server' ;
2019import type { Topology } from '../sdam/topology' ;
21- import type { ClientSession } from '../sessions' ;
2220import { type Sort } from '../sort' ;
2321import { TimeoutContext } from '../timeout' ;
2422import {
@@ -854,40 +852,6 @@ export interface BulkWriteOptions extends CommandOperationOptions {
854852 timeoutContext ?: TimeoutContext ;
855853}
856854
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-
891855/** @public */
892856export abstract class BulkOperationBase {
893857 isOrdered : boolean ;
0 commit comments