ravendb
Version:
RavenDB client for Node.js
43 lines • 1.32 kB
JavaScript
import { RavenCommand } from "../../../Http/RavenCommand.js";
import { throwError } from "../../../Exceptions/index.js";
export class StartTransactionsRecordingOperation {
_filePath;
constructor(filePath) {
if (!filePath) {
throwError("InvalidArgumentException", "FilePath cannot be null");
}
this._filePath = filePath;
}
getCommand(conventions) {
return new StartTransactionsRecordingCommand(this._filePath);
}
get resultType() {
return "CommandResult";
}
}
class StartTransactionsRecordingCommand extends RavenCommand {
_filePath;
constructor(filePath) {
super();
this._filePath = filePath;
}
createRequest(node) {
const uri = node.url + "/databases/" + node.database + "/admin/transactions/start-recording";
const body = this._serializer.serialize({
File: this._filePath
});
return {
uri,
method: "POST",
headers: this._headers().typeAppJson().build(),
body
};
}
get isReadRequest() {
return false;
}
async setResponseAsync(bodyStream, fromCache) {
return this._parseResponseDefaultAsync(bodyStream);
}
}
//# sourceMappingURL=StartTransactionsRecordingOperation.js.map