Final Class Yiisoft\Db\Pgsql\Driver
| Inheritance | Yiisoft\Db\Pgsql\Driver » Yiisoft\Db\Driver\Pdo\AbstractPdoDriver |
|---|
Implements the PostgreSQL Server driver based on the PDO (PHP Data Objects) extension.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| createConnection() | Yiisoft\Db\Pgsql\Driver | |
| getDriverName() | Yiisoft\Db\Pgsql\Driver |
Method Details
| public PDO createConnection ( ) |
public function createConnection(): PDO
{
$this->attributes += [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION];
$pdo = parent::createConnection();
if ($this->charset !== null) {
$pdo->exec('SET NAMES ' . $pdo->quote($this->charset));
}
return $pdo;
}
Signup or Login in order to comment.