pqb 0.42.2 → 0.42.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4283,6 +4283,10 @@ class Transaction {
4283
4283
  return cb();
4284
4284
  return Transaction.prototype.transaction.call(this, cb);
4285
4285
  }
4286
+ isInTransaction() {
4287
+ const trx = this.internal.transactionStorage.getStore();
4288
+ return !!(trx && (!trx.testTransactionCount || trx.transactionId >= trx.testTransactionCount));
4289
+ }
4286
4290
  }
4287
4291
  const runAfterCommit = async (afterCommit, result) => {
4288
4292
  if (afterCommit) {