UNPKG

ravendb

Version:
43 lines 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetStatisticsCommand = exports.GetStatisticsOperation = void 0; const RavenCommand_js_1 = require("../../Http/RavenCommand.js"); class GetStatisticsOperation { get resultType() { return "CommandResult"; } _debugTag; _nodeTag; constructor(debugTag, nodeTag) { this._debugTag = debugTag; this._nodeTag = nodeTag; } getCommand(conventions) { return new GetStatisticsCommand(this._debugTag, this._nodeTag); } } exports.GetStatisticsOperation = GetStatisticsOperation; class GetStatisticsCommand extends RavenCommand_js_1.RavenCommand { _debugTag; constructor(debugTag, nodeTag) { super(); this._debugTag = debugTag; this._selectedNodeTag = nodeTag; this.timeout = 15_000; } createRequest(node) { let uri = `${node.url}/databases/${node.database}/stats`; if (this._debugTag) { uri += "?" + this._debugTag; } return { uri }; } async setResponseAsync(bodyStream, fromCache) { return this._parseResponseDefaultAsync(bodyStream); } get isReadRequest() { return true; } } exports.GetStatisticsCommand = GetStatisticsCommand; //# sourceMappingURL=GetStatisticsOperation.js.map