UNPKG

azurite

Version:

An open source Azure Storage API compatible server

34 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Provides and separates data access logic from batch orchestration. * * @export * @class TableBatchRepository * @implements {ITableBatchRepository} */ class TableBatchRepository { constructor(metadataStore) { this.requests = []; this.metadataStore = metadataStore; } addBatchRequest(request) { this.requests.push(request); } addBatchRequests(requests) { this.requests.push(...requests); } getBatchRequests() { return this.requests; } beginBatchTransaction(batchId) { // initialize transaction rollback capability return this.metadataStore.beginBatchTransaction(batchId); } endBatchTransaction(accountName, tableName, batchId, context, batchSuccess) { // commit or rollback transaction return this.metadataStore.endBatchTransaction(accountName, tableName, batchId, context, batchSuccess); } } exports.default = TableBatchRepository; //# sourceMappingURL=TableBatchRepository.js.map