flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
49
BACK_BACK/node_modules/mongodb/lib/operations/run_command.js
generated
vendored
Executable file
49
BACK_BACK/node_modules/mongodb/lib/operations/run_command.js
generated
vendored
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RunAdminCommandOperation = exports.RunCommandOperation = void 0;
|
||||
const utils_1 = require("../utils");
|
||||
const operation_1 = require("./operation");
|
||||
/** @internal */
|
||||
class RunCommandOperation extends operation_1.AbstractOperation {
|
||||
constructor(parent, command, options) {
|
||||
super(options);
|
||||
this.command = command;
|
||||
this.options = options;
|
||||
this.ns = parent.s.namespace.withCollection('$cmd');
|
||||
}
|
||||
get commandName() {
|
||||
return 'runCommand';
|
||||
}
|
||||
async execute(server, session) {
|
||||
this.server = server;
|
||||
const res = await server.command(this.ns, this.command, {
|
||||
...this.options,
|
||||
readPreference: this.readPreference,
|
||||
session
|
||||
}, this.options.responseType);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
exports.RunCommandOperation = RunCommandOperation;
|
||||
class RunAdminCommandOperation extends operation_1.AbstractOperation {
|
||||
constructor(command, options) {
|
||||
super(options);
|
||||
this.command = command;
|
||||
this.options = options;
|
||||
this.ns = new utils_1.MongoDBNamespace('admin', '$cmd');
|
||||
}
|
||||
get commandName() {
|
||||
return 'runCommand';
|
||||
}
|
||||
async execute(server, session) {
|
||||
this.server = server;
|
||||
const res = await server.command(this.ns, this.command, {
|
||||
...this.options,
|
||||
readPreference: this.readPreference,
|
||||
session
|
||||
});
|
||||
return res;
|
||||
}
|
||||
}
|
||||
exports.RunAdminCommandOperation = RunAdminCommandOperation;
|
||||
//# sourceMappingURL=run_command.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue