ravendb
Version:
RavenDB client for Node.js
39 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HiloReturnCommand = void 0;
const index_js_1 = require("../../../Exceptions/index.js");
const RavenCommand_js_1 = require("../../../Http/RavenCommand.js");
class HiloReturnCommand extends RavenCommand_js_1.RavenCommand {
get isReadRequest() {
return false;
}
_tag;
_last;
_end;
constructor(tag, last, end) {
super();
if (last < 0) {
(0, index_js_1.throwError)("InvalidArgumentException", "last is < 0");
}
if (end < 0) {
(0, index_js_1.throwError)("InvalidArgumentException", "end is < 0");
}
if (!tag) {
(0, index_js_1.throwError)("InvalidArgumentException", "tag cannot be null");
}
this._tag = tag;
this._last = last;
this._end = end;
this._responseType = "Empty";
}
createRequest(node) {
const uri = `${node.url}/databases/${node.database}/hilo/return?`
+ `tag=${this._tag}&end=${this._end}&last=${this._last}`;
return {
method: "PUT",
uri
};
}
}
exports.HiloReturnCommand = HiloReturnCommand;
//# sourceMappingURL=HiloReturnCommand.js.map