stats.js 786 B

12345678910111213141516171819202122
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.DbStatsOperation = void 0;
  4. const command_1 = require("./command");
  5. const operation_1 = require("./operation");
  6. /** @internal */
  7. class DbStatsOperation extends command_1.CommandOperation {
  8. constructor(db, options) {
  9. super(db, options);
  10. this.options = options;
  11. }
  12. async execute(server, session) {
  13. const command = { dbStats: true };
  14. if (this.options.scale != null) {
  15. command.scale = this.options.scale;
  16. }
  17. return super.executeCommand(server, session, command);
  18. }
  19. }
  20. exports.DbStatsOperation = DbStatsOperation;
  21. (0, operation_1.defineAspects)(DbStatsOperation, [operation_1.Aspect.READ_OPERATION]);
  22. //# sourceMappingURL=stats.js.map