diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/DB/ConnectionFactory.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/DB/ConnectionFactory.php b/lib/private/DB/ConnectionFactory.php index 4b286ff5442..11b17795634 100644 --- a/lib/private/DB/ConnectionFactory.php +++ b/lib/private/DB/ConnectionFactory.php @@ -132,6 +132,7 @@ class ConnectionFactory { $eventManager->addEventSubscriber( new SQLSessionInit("SET SESSION AUTOCOMMIT=1")); break; + case 'oci': $eventManager->addEventSubscriber(new OracleSessionInit); // the driverOptions are unused in dbal and need to be mapped to the parameters @@ -151,6 +152,15 @@ class ConnectionFactory { unset($additionalConnectionParams['host']); break; + case 'pgsql': + // pg_connect used by Doctrine DBAL does not support URI notation (enclosed in brackets) + $matches = []; + if (preg_match('/^\[([^\]]+)\]$/', $additionalConnectionParams['host'], $matches)) { + // Host variable carries a port or socket. + $additionalConnectionParams['host'] = $matches[1]; + } + break; + case 'sqlite3': $journalMode = $additionalConnectionParams['sqlite.journal_mode']; $additionalConnectionParams['platform'] = new OCSqlitePlatform(); |