Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit bed0146

Browse files
committed
Add implementation for pgsql driver.
1 parent f444d8c commit bed0146

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Adapter/Driver/Pgsql/Pgsql.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ public function checkConnection(StatementInterface $statement = null)
253253
for ($i = 0; $i < $reconnectTries; ++$i) {
254254
if (pg_connection_status($pg_sql) == PGSQL_CONNECTION_OK) {
255255
if ($statement instanceof Statement) {
256-
$statement->initialize($pg_sql);
256+
$statement
257+
->initialize($pg_sql)
258+
->prepare();
257259
}
258260

259261
return $this;

src/Adapter/Driver/Pgsql/Statement.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function getProfiler()
8888
* Initialize
8989
*
9090
* @param resource $pgsql
91-
* @return void
91+
* @return $this
9292
* @throws Exception\RuntimeException for invalid or missing postgresql connection
9393
*/
9494
public function initialize($pgsql)
@@ -101,6 +101,7 @@ public function initialize($pgsql)
101101
));
102102
}
103103
$this->pgsql = $pgsql;
104+
return $this;
104105
}
105106

106107
/**

0 commit comments

Comments
 (0)