ravendb
Version:
RavenDB client for Node.js
42 lines • 1.24 kB
JavaScript
import { RavenCommand } from "../../../Http/RavenCommand.js";
export class GetIndexNamesOperation {
get resultType() {
return "CommandResult";
}
_start;
_pageSize;
constructor(start, pageSize) {
this._start = start;
this._pageSize = pageSize;
}
getCommand(conventions) {
return new GetIndexNamesCommand(this._start, this._pageSize);
}
}
export class GetIndexNamesCommand extends RavenCommand {
_start;
_pageSize;
constructor(start, pageSize) {
super();
this._start = start;
this._pageSize = pageSize;
}
createRequest(node) {
const uri = node.url + "/databases/" + node.database
+ "/indexes?start=" + this._start + "&pageSize=" + this._pageSize + "&namesOnly=true";
return { uri };
}
async setResponseAsync(bodyStream, fromCache) {
if (!bodyStream) {
this._throwInvalidResponse();
}
let body = null;
const results = await this._defaultPipeline(_ => body = _).process(bodyStream);
this.result = results["results"];
return body;
}
get isReadRequest() {
return true;
}
}
//# sourceMappingURL=GetIndexNamesOperation.js.map