summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-08-26 14:25:17 +0200
committerRobin Appelman <robin@icewind.nl>2021-10-21 18:33:43 +0200
commitc3d9471fe0debb09823495270f66853131f71e0d (patch)
treee7174d387be8585c7b7a30f4cea395f334b6dbd7 /lib
parentd4fc462980b1223b14bcf91c3412ec897b0facde (diff)
downloadnextcloud-server-c3d9471fe0debb09823495270f66853131f71e0d.tar.gz
nextcloud-server-c3d9471fe0debb09823495270f66853131f71e0d.zip
disable path prefix index on postgresql for now
having the index work properly for the queries we need it for requires some additional options which dbal does not support at the momement. to prevent making it harder to add the correct index later on we don't create the index for now on postgresql Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/DB/SchemaWrapper.php13
-rw-r--r--lib/public/DB/ISchemaWrapper.php15
2 files changed, 27 insertions, 1 deletions
diff --git a/lib/private/DB/SchemaWrapper.php b/lib/private/DB/SchemaWrapper.php
index 20ae5b6faa6..9f7623bac44 100644
--- a/lib/private/DB/SchemaWrapper.php
+++ b/lib/private/DB/SchemaWrapper.php
@@ -24,6 +24,8 @@
namespace OC\DB;
+use Doctrine\DBAL\Exception;
+use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Schema;
use OCP\DB\ISchemaWrapper;
@@ -130,4 +132,15 @@ class SchemaWrapper implements ISchemaWrapper {
public function getTables() {
return $this->schema->getTables();
}
+
+ /**
+ * Gets the DatabasePlatform for the database.
+ *
+ * @return AbstractPlatform
+ *
+ * @throws Exception
+ */
+ public function getDatabasePlatform() {
+ return $this->connection->getDatabasePlatform();
+ }
}
diff --git a/lib/public/DB/ISchemaWrapper.php b/lib/public/DB/ISchemaWrapper.php
index 3d58a10d2d2..1eac5c4f755 100644
--- a/lib/public/DB/ISchemaWrapper.php
+++ b/lib/public/DB/ISchemaWrapper.php
@@ -23,6 +23,9 @@
namespace OCP\DB;
+use Doctrine\DBAL\Exception;
+use Doctrine\DBAL\Platforms\AbstractPlatform;
+
/**
* Interface ISchemaWrapper
*
@@ -82,7 +85,7 @@ interface ISchemaWrapper {
* @since 13.0.0
*/
public function getTableNames();
-
+
/**
* Gets all table names
*
@@ -90,4 +93,14 @@ interface ISchemaWrapper {
* @since 13.0.0
*/
public function getTableNamesWithoutPrefix();
+
+ /**
+ * Gets the DatabasePlatform for the database.
+ *
+ * @return AbstractPlatform
+ *
+ * @throws Exception
+ * @since 23.0.0
+ */
+ public function getDatabasePlatform();
}