Rev 814 | Rev 863 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 814 | Rev 817 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | class OIDplusDatabaseConnectionPgSql extends OIDplusDatabaseConnection { |
22 | class OIDplusDatabaseConnectionPgSql extends OIDplusDatabaseConnection { |
23 | private $conn = null; |
23 | private $conn = null; |
24 | private $already_prepared = array(); |
24 | private $already_prepared = array(); |
25 | private $last_error = null; // do the same like MySQL+PDO, just to be equal in the behavior |
25 | private $last_error = null; // do the same like MySQL+PDO, just to be equal in the behavior |
26 | 26 | ||
27 | public static function getPlugin(): OIDplusDatabasePlugin { |
- | |
28 | return new OIDplusDatabasePluginPgSql(); |
- | |
29 | } |
- | |
30 | - | ||
31 | public function doQuery(string $sql, /*?array*/ $prepared_args=null): OIDplusQueryResult { |
27 | public function doQuery(string $sql, /*?array*/ $prepared_args=null): OIDplusQueryResult { |
32 | $this->last_error = null; |
28 | $this->last_error = null; |
33 | if (is_null($prepared_args)) { |
29 | if (is_null($prepared_args)) { |
34 | $res = @pg_query($this->conn, $sql); |
30 | $res = @pg_query($this->conn, $sql); |
35 | 31 |