[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Stub out DatabaseBase::getSearchEngine() as a dummy method

2016-09-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Stub out DatabaseBase::getSearchEngine() as a dummy method
..


Stub out DatabaseBase::getSearchEngine() as a dummy method

SearchEngineFactory::getSearchEngineClass() should be used instead

Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f
---
M includes/db/DatabaseMssql.php
M includes/db/DatabaseOracle.php
M includes/db/DatabasePostgres.php
M includes/libs/rdbms/database/DatabaseBase.php
M includes/libs/rdbms/database/DatabaseMysqlBase.php
M includes/libs/rdbms/database/DatabaseSqlite.php
6 files changed, 1 insertion(+), 35 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 339174e..be5fac9 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -1258,13 +1258,6 @@
}
 
/**
-* @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
 * @param string $table
diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php
index 9e821a1..ee1bf65 100644
--- a/includes/db/DatabaseOracle.php
+++ b/includes/db/DatabaseOracle.php
@@ -1509,10 +1509,6 @@
return 'CAST ( ' . $field . ' AS VARCHAR2 )';
}
 
-   public function getSearchEngine() {
-   return 'SearchOracle';
-   }
-
public function getInfinity() {
return '31-12-2030 12:00:00.00';
}
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 2773067..e5ce283 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -1533,10 +1533,6 @@
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$' ) {
diff --git a/includes/libs/rdbms/database/DatabaseBase.php 
b/includes/libs/rdbms/database/DatabaseBase.php
index 2c8e67cd..2c8d239 100644
--- a/includes/libs/rdbms/database/DatabaseBase.php
+++ b/includes/libs/rdbms/database/DatabaseBase.php
@@ -75,10 +75,8 @@
}
 
/**
-* 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';
diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php 
b/includes/libs/rdbms/database/DatabaseMysqlBase.php
index b3f1add..2d19081 100644
--- a/includes/libs/rdbms/database/DatabaseMysqlBase.php
+++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php
@@ -1058,16 +1058,6 @@
}
 
/**
-* 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
 */
public function setBigSelects( $value = true ) {
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php 
b/includes/libs/rdbms/database/DatabaseSqlite.php
index 11acde7..817f8b4 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -835,13 +835,6 @@
}
 
/**
-* @return string
-*/
-   public function getSearchEngine() {
-   return "SearchSqlite";
-   }
-
-   /**
 * No-op version of deadlockLoop
 *
 * @return mixed

-- 
To view, visit https://gerrit.wikimedia.org/r/311082
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Skizzerz 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Stub out DatabaseBase::getSearchEngine() as a dummy method

2016-09-15 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311082

Change subject: Stub out DatabaseBase::getSearchEngine() as a dummy method
..

Stub out DatabaseBase::getSearchEngine() as a dummy method

Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f
SearchEngineFactory::getSearchEngineClass() should be used instead
---
M includes/db/Database.php
M includes/db/DatabaseMssql.php
M includes/db/DatabaseMysqlBase.php
M includes/db/DatabaseOracle.php
M includes/db/DatabasePostgres.php
M includes/db/DatabaseSqlite.php
6 files changed, 1 insertion(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/311082/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index a2d6e3c..53444df 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -3619,10 +3619,8 @@
}
 
/**
-* 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';
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index 4ffafde..21323fa 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -1266,13 +1266,6 @@
}
 
/**
-* @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
 * @param string $table
diff --git a/includes/db/DatabaseMysqlBase.php 
b/includes/db/DatabaseMysqlBase.php
index f8737a8..d302000 100644
--- a/includes/db/DatabaseMysqlBase.php
+++ b/includes/db/DatabaseMysqlBase.php
@@ -1057,16 +1057,6 @@
}
 
/**
-* 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
 */
public function setBigSelects( $value = true ) {
diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php
index df311aa..4ad8e6d 100644
--- a/includes/db/DatabaseOracle.php
+++ b/includes/db/DatabaseOracle.php
@@ -1517,10 +1517,6 @@
return 'CAST ( ' . $field . ' AS VARCHAR2 )';
}
 
-   public function getSearchEngine() {
-   return 'SearchOracle';
-   }
-
public function getInfinity() {
return '31-12-2030 12:00:00.00';
}
diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index 590e1f4..783ba04 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -1545,10 +1545,6 @@
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$' ) {
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index 0cbb496..8b5ba28 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -841,13 +841,6 @@
}
 
/**
-* @return string
-*/
-   public function getSearchEngine() {
-   return "SearchSqlite";
-   }
-
-   /**
 * No-op version of deadlockLoop
 *
 * @return mixed

-- 
To view, visit https://gerrit.wikimedia.org/r/311082
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I984b80815633a8dc38a76d7de8a46ec249ae729f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits