Stub out DatabaseBase::getSearchEngine() as a dummy method
authorAaron Schulz <aschulz@wikimedia.org>
Fri, 16 Sep 2016 02:36:40 +0000 (19:36 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 19 Sep 2016 15:11:18 +0000 (08:11 -0700)
SearchEngineFactory::getSearchEngineClass() should be used instead

Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f

includes/db/DatabaseMssql.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/libs/rdbms/database/DatabaseBase.php
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/DatabaseSqlite.php

index 339174e..be5fac9 100644 (file)
@@ -1257,13 +1257,6 @@ class DatabaseMssql extends DatabaseBase {
                return $sql;
        }
 
-       /**
-        * @return string
-        */
-       public function getSearchEngine() {
-               return "SearchMssql";
-       }
-
        /**
         * Returns an associative array for fields that are of type varbinary, binary, or image
         * $table can be either a raw table name or passed through tableName() first
index 9e821a1..ee1bf65 100644 (file)
@@ -1509,10 +1509,6 @@ class DatabaseOracle extends DatabaseBase {
                return 'CAST ( ' . $field . ' AS VARCHAR2 )';
        }
 
-       public function getSearchEngine() {
-               return 'SearchOracle';
-       }
-
        public function getInfinity() {
                return '31-12-2030 12:00:00.000000';
        }
index 2773067..e5ce283 100644 (file)
@@ -1533,10 +1533,6 @@ SQL;
                return $field . '::text';
        }
 
-       public function getSearchEngine() {
-               return 'SearchPostgres';
-       }
-
        public function streamStatementEnd( &$sql, &$newLine ) {
                # Allow dollar quoting for function declarations
                if ( substr( $newLine, 0, 4 ) == '$mw$' ) {
index 2c8e67c..2c8d239 100644 (file)
@@ -75,10 +75,8 @@ abstract class DatabaseBase extends Database {
        }
 
        /**
-        * Get search engine class. All subclasses of this need to implement this
-        * if they wish to use searching.
-        *
         * @return string
+        * @deprecated since 1.27; use SearchEngineFactory::getSearchEngineClass()
         */
        public function getSearchEngine() {
                return 'SearchEngineDummy';
index b3f1add..2d19081 100644 (file)
@@ -1057,16 +1057,6 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                return true;
        }
 
-       /**
-        * Get search engine class. All subclasses of this
-        * need to implement this if they wish to use searching.
-        *
-        * @return string
-        */
-       public function getSearchEngine() {
-               return 'SearchMySQL';
-       }
-
        /**
         * @param bool $value
         */
index 11acde7..817f8b4 100644 (file)
@@ -834,13 +834,6 @@ class DatabaseSqlite extends DatabaseBase {
                return 'CAST ( ' . $field . ' AS TEXT )';
        }
 
-       /**
-        * @return string
-        */
-       public function getSearchEngine() {
-               return "SearchSqlite";
-       }
-
        /**
         * No-op version of deadlockLoop
         *