ravendb
Version:
RavenDB client for Node.js
28 lines • 887 B
JavaScript
import { RavenCommand } from "../../Http/RavenCommand.js";
export class GetNextOperationIdCommand extends 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;
}
}
//# sourceMappingURL=GetNextOperationIdCommand.js.map