diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2024-04-17 11:19:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-17 11:19:04 +0200 |
commit | 88859aa41cda5140f6c6d55eab58418153c0744c (patch) | |
tree | 3de9ea8d48a023fca3753fc5b0cf44f3d1feed46 /lib | |
parent | c4370b625b1d24f8646a7cd87e07d138068efbdb (diff) | |
parent | 2cabc708fbb2aab8e0f6d90155bd253041767f39 (diff) | |
download | nextcloud-server-88859aa41cda5140f6c6d55eab58418153c0744c.tar.gz nextcloud-server-88859aa41cda5140f6c6d55eab58418153c0744c.zip |
Merge pull request #44461 from nextcloud/backport/44394/stable28
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(); |