MediaWiki  REL1_20
TableCleanup Class Reference

Generic class to cleanup a database table. More...

Inheritance diagram for TableCleanup:
Collaboration diagram for TableCleanup:

List of all members.

Public Member Functions

 __construct ()
 Default constructor.
 execute ()
 Do the actual work.
 runTable ($params)

Public Attributes

 $batchSize = 100
 $reportInterval = 100

Protected Member Functions

 hexChar ($matches)
 init ($count, $table)
 progress ($updated)

Protected Attributes

 $defaultParams
 $dryrun = false
 $maxLag = 10

Detailed Description

Generic class to cleanup a database table.

Already subclasses Maintenance.

Definition at line 31 of file cleanupTable.inc.


Constructor & Destructor Documentation

Default constructor.

Children should call this *first* if implementing their own constructors

Reimplemented from Maintenance.

Reimplemented in ImageCleanup, WatchlistCleanup, CapsCleanup, and TitleCleanup.

Definition at line 44 of file cleanupTable.inc.

References Maintenance\addOption().


Member Function Documentation

Do the actual work.

All child classes will need to implement this

Reimplemented from Maintenance.

Reimplemented in WatchlistCleanup, and CapsCleanup.

Definition at line 49 of file cleanupTable.inc.

References $wgUser, Maintenance\hasOption(), User\newFromName(), Maintenance\output(), and runTable().

TableCleanup::hexChar ( matches) [protected]

Definition at line 159 of file cleanupTable.inc.

References $matches.

TableCleanup::init ( count,
table 
) [protected]

Definition at line 61 of file cleanupTable.inc.

References $count.

Referenced by runTable().

TableCleanup::runTable ( params)

Definition at line 99 of file cleanupTable.inc.

References $count, $dbr, $options, $params, $res, init(), Maintenance\output(), and wfGetDB().

Referenced by CapsCleanup\execute(), and execute().


Member Data Documentation

TableCleanup::$batchSize = 100

Definition at line 41 of file cleanupTable.inc.

TableCleanup::$defaultParams [protected]
Initial value:
 array(
                'table' => 'page',
                'conds' => array(),
                'index' => 'page_id',
                'callback' => 'processRow',
        )

Reimplemented in ImageCleanup, and WatchlistCleanup.

Definition at line 32 of file cleanupTable.inc.

TableCleanup::$dryrun = false [protected]

Definition at line 39 of file cleanupTable.inc.

TableCleanup::$maxLag = 10 [protected]

Definition at line 40 of file cleanupTable.inc.

TableCleanup::$reportInterval = 100

Definition at line 42 of file cleanupTable.inc.


The documentation for this class was generated from the following file: