class BatchRowIterator implements RecursiveIterator {
/**
- * @var DatabaseBase $db The database to read from
+ * @var IDatabase $db The database to read from
*/
protected $db;
/**
* @var array $fetchColumns List of column names to select from the
- * table suitable for use with DatabaseBase::select()
+ * table suitable for use with IDatabase::select()
*/
protected $fetchColumns;
private $key;
/**
- * @param DatabaseBase $db The database to read from
+ * @param IDatabase $db The database to read from
* @param string $table The name 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
*/
- public function __construct( DatabaseBase $db, $table, $primaryKey, $batchSize ) {
+ public function __construct( IDatabase $db, $table, $primaryKey, $batchSize ) {
if ( $batchSize < 1 ) {
throw new MWException( 'Batch size must be at least 1 row.' );
}
/**
* @param array $condition Query conditions suitable for use with
- * DatabaseBase::select
+ * IDatabase::select
*/
public function addConditions( array $conditions ) {
$this->conditions = array_merge( $this->conditions, $conditions );
/**
* @param array $condition Query join conditions suitable for use
- * with DatabaseBase::select
+ * with IDatabase::select
*/
public function addJoinConditions( array $conditions ) {
$this->joinConditions = array_merge( $this->joinConditions, $conditions );
/**
* @param array $columns List of column names to select from the
- * table suitable for use with DatabaseBase::select()
+ * table suitable for use with IDatabase::select()
*/
public function setFetchColumns( array $columns ) {
// If it's not the all column selector merge in the primary keys we need