From 83b573a3e83039fb38dbacbc417f37808a9fc574 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 15 Sep 2016 22:37:29 -0700 Subject: [PATCH] Remove strictIPs(), cascadingDeletes(), and cleanupTriggers() These DatabaseBase methods have no callers are were a mistake to begin with. They only encouraged code forking and incompatibilities among different backing DB types. Also removed stray realTimestamps() method that was left over from prior removals. Change-Id: I37bef8585151e2782d2c88b5ae1e6752109c6ac7 --- includes/db/DatabaseMssql.php | 12 --------- includes/db/DatabaseOracle.php | 12 --------- includes/db/DatabasePostgres.php | 12 --------- includes/libs/rdbms/database/DatabaseBase.php | 27 ++----------------- 4 files changed, 2 insertions(+), 61 deletions(-) diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index 2c6db103b9..00fb800725 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -42,18 +42,6 @@ class DatabaseMssql extends DatabaseBase { protected $mPort; - public function cascadingDeletes() { - return true; - } - - public function cleanupTriggers() { - return false; - } - - public function realTimestamps() { - return false; - } - public function implicitGroupby() { return false; } diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index ee1bf65731..561dadb72f 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -176,18 +176,6 @@ class DatabaseOracle extends DatabaseBase { return 'oracle'; } - function cascadingDeletes() { - return true; - } - - function cleanupTriggers() { - return true; - } - - function strictIPs() { - return true; - } - function implicitGroupby() { return false; } diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index e5ce283cbf..1907bab5b5 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -227,18 +227,6 @@ class DatabasePostgres extends DatabaseBase { return 'postgres'; } - function cascadingDeletes() { - return true; - } - - function cleanupTriggers() { - return true; - } - - function strictIPs() { - return true; - } - function implicitGroupby() { return false; } diff --git a/includes/libs/rdbms/database/DatabaseBase.php b/includes/libs/rdbms/database/DatabaseBase.php index 2c8d239073..ef72998944 100644 --- a/includes/libs/rdbms/database/DatabaseBase.php +++ b/includes/libs/rdbms/database/DatabaseBase.php @@ -49,32 +49,9 @@ abstract class DatabaseBase extends Database { } /** - * Returns true if this database supports (and uses) cascading deletes + * Get search engine class. All subclasses of this need to implement this + * if they wish to use searching. * - * @return bool - */ - public function cascadingDeletes() { - return false; - } - /** - * Returns true if this database supports (and uses) triggers (e.g. on the page table) - * - * @return bool - */ - public function cleanupTriggers() { - return false; - } - /** - * Returns true if this database is strict about what can be put into an IP field. - * Specifically, it uses a NULL value instead of an empty string. - * - * @return bool - */ - public function strictIPs() { - return false; - } - - /** * @return string * @deprecated since 1.27; use SearchEngineFactory::getSearchEngineClass() */ -- 2.20.1