UNPKG

ravendb

Version:
42 lines 1.29 kB
import { throwError } from "../../../Exceptions/index.js"; import { RavenCommand } from "../../../Http/RavenCommand.js"; import { RaftIdGenerator } from "../../../Utility/RaftIdGenerator.js"; export class DeleteServerWideSorterOperation { _sorterName; constructor(sorterName) { if (!sorterName) { throwError("InvalidArgumentException", "SorterName cannot be null"); } this._sorterName = sorterName; } get resultType() { return "CommandResult"; } getCommand(conventions) { return new DeleteServerWideSorterCommand(this._sorterName); } } class DeleteServerWideSorterCommand extends RavenCommand { _sorterName; constructor(sorterName) { super(); if (!sorterName) { throwError("InvalidArgumentException", "SorterName cannot be null"); } this._sorterName = sorterName; } createRequest(node) { const uri = node.url + "/admin/sorters?name=" + this._urlEncode(this._sorterName); return { uri, method: "DELETE" }; } get isReadRequest() { return false; } getRaftUniqueRequestId() { return RaftIdGenerator.newId(); } } //# sourceMappingURL=DeleteServerWideSorterOperation.js.map