MediaWiki master
|
Utility class that keeps a list of DB tables that were (presumably) changed by write queries. More...
Static Public Member Functions | |
static | getTables (string $domainId) |
Get the tables for a given domain ID. | |
static | recordQuery (DatabaseDomain $domain, Query $query) |
When tracking is enabled and a query alters tables, record the list of tables that are altered. | |
static | startTracking () |
Enables query tracking and resets the list of changed tables. | |
static | stopTracking () |
Reset the internal list and disable tracking. | |
Utility class that keeps a list of DB tables that were (presumably) changed by write queries.
This should only be used in PHPUnit tests. This class should remain a static util class, because it must never be replaced by a mock in tests.
Definition at line 15 of file ChangedTablesTracker.php.
|
static |
Get the tables for a given domain ID.
string | $domainId |
Definition at line 41 of file ChangedTablesTracker.php.
|
static |
When tracking is enabled and a query alters tables, record the list of tables that are altered.
Any table that gets dropped gets removed from the list of altered tables.
Definition at line 61 of file ChangedTablesTracker.php.
Referenced by Wikimedia\Rdbms\Database\executeQuery().
|
static |
Enables query tracking and resets the list of changed tables.
Definition at line 24 of file ChangedTablesTracker.php.
|
static |
Reset the internal list and disable tracking.
Definition at line 49 of file ChangedTablesTracker.php.