Remove strictIPs(), cascadingDeletes(), and cleanupTriggers()
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 16 Sep 2016 05:37:29 +0000 (22:37 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 19 Sep 2016 20:12:11 +0000 (20:12 +0000)
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
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/libs/rdbms/database/DatabaseBase.php

index 2c6db10..00fb800 100644 (file)
@@ -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;
        }
index ee1bf65..561dadb 100644 (file)
@@ -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;
        }
index e5ce283..1907bab 100644 (file)
@@ -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;
        }
index 2c8d239..ef72998 100644 (file)
@@ -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()
         */