@@ -7,15 +7,14 @@ import type { Server } from '../sdam/server';
7
7
import { MIN_SECONDARY_WRITE_WIRE_VERSION } from '../sdam/server_selection' ;
8
8
import type { ClientSession } from '../sessions' ;
9
9
import {
10
- type Callback ,
11
10
commandSupportsReadConcern ,
12
11
decorateWithExplain ,
13
12
maxWireVersion ,
14
13
MongoDBNamespace
15
14
} from '../utils' ;
16
15
import { WriteConcern , type WriteConcernOptions } from '../write_concern' ;
17
16
import type { ReadConcernLike } from './../read_concern' ;
18
- import { AbstractCallbackOperation , Aspect , type OperationOptions } from './operation' ;
17
+ import { AbstractOperation , Aspect , type OperationOptions } from './operation' ;
19
18
20
19
/** @public */
21
20
export interface CollationOptions {
@@ -68,7 +67,7 @@ export interface OperationParent {
68
67
}
69
68
70
69
/** @internal */
71
- export abstract class CommandOperation < T > extends AbstractCallbackOperation < T > {
70
+ export abstract class CommandOperation < T > extends AbstractOperation < T > {
72
71
override options : CommandOperationOptions ;
73
72
readConcern ?: ReadConcern ;
74
73
writeConcern ?: WriteConcern ;
@@ -156,22 +155,3 @@ export abstract class CommandOperation<T> extends AbstractCallbackOperation<T> {
156
155
return server . commandAsync ( this . ns , cmd , options ) ;
157
156
}
158
157
}
159
-
160
- /** @internal */
161
- export abstract class CommandCallbackOperation < T = any > extends CommandOperation < T > {
162
- constructor ( parent ?: OperationParent , options ?: CommandOperationOptions ) {
163
- super ( parent , options ) ;
164
- }
165
-
166
- executeCommandCallback (
167
- server : Server ,
168
- session : ClientSession | undefined ,
169
- cmd : Document ,
170
- callback : Callback
171
- ) : void {
172
- super . executeCommand ( server , session , cmd ) . then (
173
- res => callback ( undefined , res ) ,
174
- err => callback ( err , undefined )
175
- ) ;
176
- }
177
- }
0 commit comments