MediaWiki
REL1_22
|
Abstract base class for update jobs that put some secondary data extracted from article content into the database. More...
Public Member Functions | |
__construct ($withTransaction=true) | |
Constructor. | |
abortTransaction () | |
Abort the database transaction started via beginTransaction (if any). | |
beginTransaction () | |
Begin a database transaction, if $withTransaction was given as true in the constructor for this SqlDataUpdate. | |
commitTransaction () | |
Commit the database transaction started via beginTransaction (if any). | |
Protected Member Functions | |
invalidatePages ($namespace, array $dbkeys) | |
Invalidate the cache of a list of pages from a single namespace. | |
Protected Attributes | |
$mDb | |
Database connection reference. | |
$mOptions | |
SELECT options to be used (array) | |
$mUseTransaction | |
bool whether this update should be wrapped in a transaction | |
Private Attributes | |
$mHasTransaction | |
bool whether a transaction is open on this object (internal use only!) |
Abstract base class for update jobs that put some secondary data extracted from article content into the database.
Definition at line 33 of file SqlDataUpdate.php.
SqlDataUpdate::__construct | ( | $ | withTransaction = true | ) |
Constructor.
bool | $withTransaction | whether this update should be wrapped in a transaction (default: true). A transaction is only started if no transaction is already in progress, see beginTransaction() for details. |
Definition at line 48 of file SqlDataUpdate.php.
References DataUpdate\__construct(), array(), global, and wfGetDB().
Abort the database transaction started via beginTransaction (if any).
Definition at line 97 of file SqlDataUpdate.php.
Begin a database transaction, if $withTransaction was given as true in the constructor for this SqlDataUpdate.
Because nested transactions are not supported by the Database class, this implementation checks Database::trxLevel() and only opens a transaction if none is already active.
Reimplemented from DataUpdate.
Definition at line 72 of file SqlDataUpdate.php.
Commit the database transaction started via beginTransaction (if any).
Reimplemented from DataUpdate.
Definition at line 87 of file SqlDataUpdate.php.
SqlDataUpdate::invalidatePages | ( | $ | namespace, |
array $ | dbkeys | ||
) | [protected] |
Invalidate the cache of a list of pages from a single namespace.
This is intended for use by subclasses.
$namespace | Integer |
$dbkeys | Array |
Definition at line 111 of file SqlDataUpdate.php.
SqlDataUpdate::$mDb [protected] |
Database connection reference.
Reimplemented in LinksUpdate.
Definition at line 35 of file SqlDataUpdate.php.
SqlDataUpdate::$mHasTransaction [private] |
bool whether a transaction is open on this object (internal use only!)
Definition at line 38 of file SqlDataUpdate.php.
SqlDataUpdate::$mOptions [protected] |
SELECT options to be used (array)
Reimplemented in LinksUpdate.
Definition at line 36 of file SqlDataUpdate.php.
SqlDataUpdate::$mUseTransaction [protected] |
bool whether this update should be wrapped in a transaction
Definition at line 39 of file SqlDataUpdate.php.