"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTransaction = exports.withTransaction = void 0;
const TRANSACTION_KEY = "ctx-key-db-transaction";
const withTransaction = (ctx, tx) => {
    return Object.assign(Object.assign({}, ctx), { [TRANSACTION_KEY]: tx });
};
exports.withTransaction = withTransaction;
const getTransaction = (ctx) => {
    const l = ctx[TRANSACTION_KEY];
    if (l == undefined) {
        return undefined;
    }
    return l;
};
exports.getTransaction = getTransaction;
//# sourceMappingURL=context.js.map