@prisma/client-engine-runtime 6.4.0-dev.28 → 6.4.0-dev.30
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -319,6 +319,7 @@ export declare class TransactionManager {
|
|
|
319
319
|
rollbackTransaction(transactionId: string): Promise<void>;
|
|
320
320
|
getTransaction(txInfo: Tx.InteractiveTransactionInfo<unknown>, operation: string): Transaction;
|
|
321
321
|
private getActiveTransaction;
|
|
322
|
+
cancelAllTransactions(): Promise<void>;
|
|
322
323
|
private startTransactionTimeout;
|
|
323
324
|
private closeTransaction;
|
|
324
325
|
private validateOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -319,6 +319,7 @@ export declare class TransactionManager {
|
|
|
319
319
|
rollbackTransaction(transactionId: string): Promise<void>;
|
|
320
320
|
getTransaction(txInfo: Tx.InteractiveTransactionInfo<unknown>, operation: string): Transaction;
|
|
321
321
|
private getActiveTransaction;
|
|
322
|
+
cancelAllTransactions(): Promise<void>;
|
|
322
323
|
private startTransactionTimeout;
|
|
323
324
|
private closeTransaction;
|
|
324
325
|
private validateOptions;
|
package/dist/index.js
CHANGED
|
@@ -767,6 +767,9 @@ var TransactionManager = class {
|
|
|
767
767
|
}
|
|
768
768
|
return transaction;
|
|
769
769
|
}
|
|
770
|
+
async cancelAllTransactions() {
|
|
771
|
+
await Promise.allSettled([...this.transactions.values()].map((tx) => this.closeTransaction(tx, "rolled_back")));
|
|
772
|
+
}
|
|
770
773
|
startTransactionTimeout(transactionId, timeout) {
|
|
771
774
|
const timeoutStartedAt = Date.now();
|
|
772
775
|
return setTimeout(async () => {
|