|
MediaWiki
master
|
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. More... | |
| abortTransaction () | |
| Abort the database transaction started via beginTransaction (if any). More... | |
| beginTransaction () | |
| Begin a database transaction, if $withTransaction was given as true in the constructor for this SqlDataUpdate. More... | |
| commitTransaction () | |
| Commit the database transaction started via beginTransaction (if any). More... | |
Public Member Functions inherited from DataUpdate | |
| __construct () | |
| beginTransaction () | |
| Begin an appropriate transaction, if any. More... | |
| commitTransaction () | |
| Commit the transaction started via beginTransaction, if any. More... | |
| rollbackTransaction () | |
| Abort / roll back the transaction started via beginTransaction, if any. More... | |
Public Member Functions inherited from DeferrableUpdate | |
| doUpdate () | |
| Perform the actual work. More... | |
Protected Member Functions | |
| invalidatePages ($namespace, array $dbkeys) | |
| Invalidate the cache of a list of pages from a single namespace. More... | |
Protected Attributes | |
| IDatabase | $mDb |
| Database connection reference. More... | |
| array | $mOptions = [] |
| SELECT options to be used (array) More... | |
| bool | $mUseTransaction |
| Whether this update should be wrapped in a transaction. More... | |
Private Attributes | |
| bool | $mHasTransaction |
| Whether a transaction is open on this object (internal use only!) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DataUpdate | |
| static | runUpdates (array $updates, $mode= 'run') |
| Convenience method, calls doUpdate() on every DataUpdate in the array. More... | |
Static Protected Member Functions inherited from DataUpdate | |
| static | enqueueUpdates (array $updates) |
| Enqueue jobs for every DataUpdate that support enqueueUpdate() and return the remaining DataUpdate objects (those that do not) More... | |
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 53 of file SqlDataUpdate.php.
| SqlDataUpdate::abortTransaction | ( | ) |
Abort the database transaction started via beginTransaction (if any).
Definition at line 95 of file SqlDataUpdate.php.
| SqlDataUpdate::beginTransaction | ( | ) |
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.
Definition at line 70 of file SqlDataUpdate.php.
| SqlDataUpdate::commitTransaction | ( | ) |
Commit the database transaction started via beginTransaction (if any).
Definition at line 85 of file SqlDataUpdate.php.
|
protected |
Invalidate the cache of a list of pages from a single namespace.
This is intended for use by subclasses.
| int | $namespace | Namespace number |
| array | $dbkeys |
Definition at line 109 of file SqlDataUpdate.php.
References $mDb, IDatabase\onTransactionPreCommitOrIdle(), and use.
Referenced by LinksUpdate\invalidateCategories(), and LinksUpdate\invalidateImageDescriptions().
|
protected |
Database connection reference.
Definition at line 35 of file SqlDataUpdate.php.
Referenced by LinksDeletionUpdate\batchDeleteByPK(), and invalidatePages().
|
private |
Whether a transaction is open on this object (internal use only!)
Definition at line 41 of file SqlDataUpdate.php.
|
protected |
SELECT options to be used (array)
Definition at line 38 of file SqlDataUpdate.php.
|
protected |
Whether this update should be wrapped in a transaction.
Definition at line 44 of file SqlDataUpdate.php.