run_command.js 1013 B

1234567891011121314151617181920212223242526
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.RunAdminCommandOperation = exports.RunCommandOperation = void 0;
  4. const utils_1 = require("../utils");
  5. const command_1 = require("./command");
  6. /** @internal */
  7. class RunCommandOperation extends command_1.CommandOperation {
  8. constructor(parent, command, options) {
  9. super(parent, options);
  10. this.options = options !== null && options !== void 0 ? options : {};
  11. this.command = command;
  12. }
  13. execute(server, session, callback) {
  14. const command = this.command;
  15. this.executeCommand(server, session, command, callback);
  16. }
  17. }
  18. exports.RunCommandOperation = RunCommandOperation;
  19. class RunAdminCommandOperation extends RunCommandOperation {
  20. constructor(parent, command, options) {
  21. super(parent, command, options);
  22. this.ns = new utils_1.MongoDBNamespace('admin');
  23. }
  24. }
  25. exports.RunAdminCommandOperation = RunAdminCommandOperation;
  26. //# sourceMappingURL=run_command.js.map