Skip to content

Commit 25712a9

Browse files
committed
Pool configuration options
1 parent 1eebcc9 commit 25712a9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Driver/MakisePostgres/PooledMakisePostgresDriver.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ class PooledMakisePostgresDriver implements DriverInterface
102102
// disable schema modifications
103103
'readonlySchema' => false,
104104

105+
// default connector is Pq connector
106+
'connector' => \MakiseCo\Postgres\Driver\Pq\PqConnector::class,
107+
105108
// minimal connection count in the pool
106109
'poolMinActive' => 0,
107110

@@ -145,7 +148,10 @@ public function __construct(array $options)
145148
$this->schemaHandler = new ReadonlyHandler($this->schemaHandler);
146149
}
147150

148-
$this->pool = new Bridge\PostgresPool($this->connectionConfig, new PqConnector());
151+
$this->pool = new Bridge\PostgresPool(
152+
$this->connectionConfig,
153+
new $options['connector']()
154+
);
149155

150156
$this->pool->setMaxActive($this->options['poolMaxActive']);
151157
$this->pool->setMinActive($this->options['poolMinActive']);

0 commit comments

Comments
 (0)