Skip to content

Commit

Permalink
fix commit chaining (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
groksrc committed Feb 2, 2024
1 parent 3e1fdc1 commit 128394a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion query/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,11 @@ export class Transaction {
const chain = options?.chain ?? false;

if (!this.#committed) {
this.#committed = true;
try {
await this.queryArray(`COMMIT ${chain ? "AND CHAIN" : ""}`);
if (!chain) {
this.#committed = true;
}
} catch (e) {
if (e instanceof PostgresError) {
throw new TransactionError(this.name, e);
Expand Down

1 comment on commit 128394a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No typecheck tests failure

This error was most likely caused by incorrect type stripping from the SWC crate

Please report the following failure to https://github.com/denoland/deno with a reproduction of the current commit

Failure log

Please sign in to comment.