UNPKG

ravendb

Version:
32 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GetNextOperationIdCommand = void 0; const RavenCommand_js_1 = require("../../Http/RavenCommand.js"); class GetNextOperationIdCommand extends RavenCommand_js_1.RavenCommand { _nodeTag; get nodeTag() { return this._nodeTag; } get isReadRequest() { return false; // disable caching } createRequest(node) { const uri = `${node.url}/databases/${node.database}/operations/next-operation-id`; return { uri }; } async setResponseAsync(bodyStream, fromCache) { let body = null; const results = await this._defaultPipeline(_ => body = _).process(bodyStream); const id = results["id"]; if (typeof id !== "undefined") { this.result = id; } const nodeTag = results["nodeTag"]; if (nodeTag) { this._nodeTag = nodeTag; } return body; } } exports.GetNextOperationIdCommand = GetNextOperationIdCommand; //# sourceMappingURL=GetNextOperationIdCommand.js.map