UNPKG

@configurator/ravendb

Version:
39 lines 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetStatisticsCommand = exports.GetStatisticsOperation = void 0; const RavenCommand_1 = require("../../Http/RavenCommand"); class GetStatisticsOperation { get resultType() { return "CommandResult"; } 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_1.RavenCommand { constructor(debugTag, nodeTag) { super(); this._debugTag = debugTag; this._selectedNodeTag = nodeTag; } 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