Skip to content

Commit 94a2465

Browse files
committed
Add transaction isolation param
1 parent 04c8bbd commit 94a2465

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/PostgresConnectionPool.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
use Amp\Sql\SqlResult;
99
use Amp\Sql\SqlStatement;
1010
use Amp\Sql\SqlTransaction;
11+
use Amp\Sql\SqlTransactionIsolation;
12+
use Amp\Sql\SqlTransactionIsolationLevel;
1113
use function Amp\async;
1214

1315
/**
@@ -33,8 +35,15 @@ public function __construct(
3335
int $idleTimeout = self::DEFAULT_IDLE_TIMEOUT,
3436
private readonly bool $resetConnections = true,
3537
?SqlConnector $connector = null,
38+
SqlTransactionIsolation $transactionIsolation = SqlTransactionIsolationLevel::Committed,
3639
) {
37-
parent::__construct($config, $connector ?? postgresConnector(), $maxConnections, $idleTimeout);
40+
parent::__construct(
41+
config: $config,
42+
connector: $connector ?? postgresConnector(),
43+
maxConnections: $maxConnections,
44+
idleTimeout: $idleTimeout,
45+
transactionIsolation: $transactionIsolation,
46+
);
3847
}
3948

4049
/**

0 commit comments

Comments
 (0)