mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-03-22 08:12:49 -04:00
* PHPStan Level 7 for more DAO PDO With new function to address common type and check problems * A bit more * PHPStan Level 7 for FreshRSS_Entry
24 lines
665 B
PHP
24 lines
665 B
PHP
<?php
|
|
|
|
/**
|
|
* MINZ - Copyright 2011 Marien Fressinaud
|
|
* Sous licence AGPL3 <http://www.gnu.org/licenses/>
|
|
*/
|
|
|
|
class Minz_PdoPgsql extends Minz_Pdo {
|
|
/** @param array<int,int|string|bool>|null $options */
|
|
public function __construct(string $dsn, ?string $username = null, ?string $passwd = null, ?array $options = null) {
|
|
parent::__construct($dsn, $username, $passwd, $options);
|
|
$this->exec("SET NAMES 'UTF8';");
|
|
}
|
|
|
|
public function dbType(): string {
|
|
return 'pgsql';
|
|
}
|
|
|
|
protected function preSql(string $statement): string {
|
|
$statement = parent::preSql($statement);
|
|
return str_replace(array('`', ' LIKE '), array('"', ' ILIKE '), $statement);
|
|
}
|
|
}
|