Skip to content

Commit 21affea

Browse files
committed
fix: run command operation
1 parent 471620a commit 21affea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/operations/run_command.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type RunCommandOptions = {
3131
} & BSONSerializeOptions;
3232

3333
/** @internal */
34-
export class RunCommandOperation<T = Document> extends ModernizedOperation<T> {
34+
export class RunCommandOperation<T = Document> extends ModernizedCommandOperation<T> {
3535
override SERVER_COMMAND_RESPONSE_TYPE = MongoDBResponse;
3636
command: Document;
3737
override options: RunCommandOptions & { responseType?: MongoDBResponseConstructor };
@@ -41,7 +41,7 @@ export class RunCommandOperation<T = Document> extends ModernizedOperation<T> {
4141
command: Document,
4242
options: RunCommandOptions & { responseType?: MongoDBResponseConstructor }
4343
) {
44-
super(options);
44+
super(undefined, options);
4545
this.command = command;
4646
this.options = options;
4747
this.ns = parent.s.namespace.withCollection('$cmd');
@@ -51,7 +51,7 @@ export class RunCommandOperation<T = Document> extends ModernizedOperation<T> {
5151
return 'runCommand' as const;
5252
}
5353

54-
override buildCommand(_connection: Connection, _session?: ClientSession): Document {
54+
override buildCommandDocument(_connection: Connection, _session?: ClientSession): Document {
5555
return this.command;
5656
}
5757

0 commit comments

Comments
 (0)