Update BatchRowIterator constructor to allow multiple tables
authorErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 18 Jul 2016 17:26:03 +0000 (10:26 -0700)
committerErik Bernhardson <ebernhardson@wikimedia.org>
Mon, 18 Jul 2016 17:27:15 +0000 (10:27 -0700)
This already supported multiple tables, but the annotations claimed it
didn't. This $table value gets passed on directly to IDatabase::select
which takes a string or array, so mark it as such here as well.

Change-Id: I28fa61429544e592f90c0855ea59279af897283f

includes/utils/BatchRowIterator.php

index 419ee47..c7bd395 100644 (file)
@@ -31,7 +31,7 @@ class BatchRowIterator implements RecursiveIterator {
        protected $db;
 
        /**
-        * @var string $table The name of the table to read from
+        * @var string|array $table The name or names of the table to read from
         */
        protected $table;
 
@@ -79,7 +79,7 @@ class BatchRowIterator implements RecursiveIterator {
 
        /**
         * @param IDatabase $db The database to read from
-        * @param string       $table      The name of the table to read from
+        * @param string|array $table      The name or names of the table to read from
         * @param string|array $primaryKey The name or names of the primary key columns
         * @param integer      $batchSize  The number of rows to fetch per iteration
         * @throws MWException