* @file
*/
+use Wikimedia\Rdbms\IDatabase;
+use Wikimedia\Rdbms\ResultWrapper;
+
/**
* This is a base class for all Query modules.
* It provides some common functionality such as constructing various SQL
/**
* Get the Query database connection (read-only)
- * @return Database
+ * @return IDatabase
*/
protected function getDB() {
if ( is_null( $this->mDb ) ) {
* @param string $name Name to assign to the database connection
* @param int $db One of the DB_* constants
* @param array $groups Query groups
- * @return Database
+ * @return IDatabase
*/
public function selectNamedDB( $name, $db, $groups ) {
$this->mDb = $this->getQuery()->getNamedDB( $name, $db, $groups );
/**
* Equivalent to addWhere(array($field => $value))
* @param string $field Field name
- * @param string $value Value; ignored if null or empty array;
+ * @param string|string[] $value Value; ignored if null or empty array;
*/
protected function addWhereFld( $field, $value ) {
// Use count() to its full documented capabilities to simultaneously
* Add an option such as LIMIT or USE INDEX. If an option was set
* before, the old value will be overwritten
* @param string $name Option name
- * @param string $value Option value
+ * @param string|string[] $value Option value
*/
protected function addOption( $name, $value = null ) {
if ( is_null( $value ) ) {
* @return ResultWrapper
*/
protected function select( $method, $extraQuery = [], array &$hookData = null ) {
-
$tables = array_merge(
$this->tables,
isset( $extraQuery['tables'] ) ? (array)$extraQuery['tables'] : []
/**
* Add information (title and namespace) about a Title object to a
* result array
- * @param array $arr Result array à la ApiResult
+ * @param array &$arr Result array à la ApiResult
* @param Title $title
* @param string $prefix Module prefix
*/