ravendb
Version:
RavenDB client for Node.js
30 lines • 1.33 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClusterWideBatchCommand = void 0;
const RaftIdGenerator_js_1 = require("../../../Utility/RaftIdGenerator.js");
const SingleNodeBatchCommand_js_1 = require("./SingleNodeBatchCommand.js");
const TypeUtil_js_1 = require("../../../Utility/TypeUtil.js");
class ClusterWideBatchCommand extends SingleNodeBatchCommand_js_1.SingleNodeBatchCommand {
_disableAtomicDocumentWrites;
get disableAtomicDocumentWrites() {
return this._disableAtomicDocumentWrites;
}
getRaftUniqueRequestId() {
return RaftIdGenerator_js_1.RaftIdGenerator.newId();
}
constructor(conventions, commands, options, disableAtomicDocumentsWrites) {
super(conventions, commands, options, "ClusterWide");
this._disableAtomicDocumentWrites = disableAtomicDocumentsWrites;
}
_appendOptions() {
let options = super._appendOptions();
if (TypeUtil_js_1.TypeUtil.isNullOrUndefined(this._disableAtomicDocumentWrites)) {
return "";
}
options
+= "&disableAtomicDocumentWrites=" + (this._disableAtomicDocumentWrites ? "true" : "false");
return options;
}
}
exports.ClusterWideBatchCommand = ClusterWideBatchCommand;
//# sourceMappingURL=ClusterWideBatchCommand.js.map