ravendb
Version:
RavenDB client for Node.js
38 lines • 1.07 kB
JavaScript
import { RavenCommand } from "../../Http/RavenCommand.js";
export 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);
}
}
export class GetStatisticsCommand extends 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;
}
}
//# sourceMappingURL=GetStatisticsOperation.js.map