typeorm-transactional-async-callbacks
Version:
A Transactional Method Decorator for typeorm that uses cls-hooked to handle and propagate transactions between different repositories and service methods. Inpired by Spring Trasnactional Annotation and Sequelize CLS
23 lines • 812 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.StorageDriver = void 0;
/**
* Enumeration that represents storage engines to use with {@link initializeTransactionalContext}
*/
var StorageDriver;
(function (StorageDriver) {
/**
* Uses AsyncLocalStorage when node >= 16 and cls-hooked otherwise
*/
StorageDriver["AUTO"] = "AUTO";
/**
* Supports legacy node versions
* Uses AcyncWrap for node < 8.2.1 and async_hooks otherwise
*/
StorageDriver["CLS_HOOKED"] = "CLS_HOOKED";
/**
* Uses AsyncLocalStorage which is available sice node 16
*/
StorageDriver["ASYNC_LOCAL_STORAGE"] = "ASYNC_LOCAL_STORAGE";
})(StorageDriver = exports.StorageDriver || (exports.StorageDriver = {}));
//# sourceMappingURL=storage-driver.js.map
;