@configurator/ravendb
Version:
RavenDB client for Node.js
31 lines • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetNextOperationIdCommand = void 0;
const RavenCommand_1 = require("../../Http/RavenCommand");
class GetNextOperationIdCommand extends RavenCommand_1.RavenCommand {
get nodeTag() {
return this._nodeTag;
}
get isReadRequest() {
return false;
}
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