Implements initial population (priming) for the wb_changes_subscription table, based on the wb_items_per_site.
More...
Implements initial population (priming) for the wb_changes_subscription table, based on the wb_items_per_site.
Any wiki linked via the wb_items_per_site table will be considered a subscriber.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::__construct |
( |
ILoadBalancer |
$loadBalancer, |
|
|
EntityIdComposer |
$entityIdComposer, |
|
|
|
$tableName, |
|
|
|
$batchSize, |
|
|
|
$verbosity = 'standard' |
|
) |
| |
- Parameters
-
ILoadBalancer | $loadBalancer | |
EntityIdComposer | $entityIdComposer | |
string | $tableName | |
int | $batchSize | |
string | $verbosity | Either 'standard' or 'verbose' |
- Exceptions
-
◆ fillSubscriptionTable()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::fillSubscriptionTable |
( |
ItemId |
$startItem = null | ) |
|
Fill the subscription table with rows based on entries in wb_items_per_site.
- Parameters
-
ItemId | null | $startItem | The item to start with. |
◆ getSubscriptionsPerItemBatch()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::getSubscriptionsPerItemBatch |
( |
IDatabase |
$db, |
|
|
& |
$continuation = [] |
|
) |
| |
|
private |
- Parameters
-
IDatabase | $db | |
array | &$continuation | |
- Returns
- array[] An associative array mapping item IDs to lists of site IDs.
◆ getSubscriptionsPerItemFromRows()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::getSubscriptionsPerItemFromRows |
( |
IResultWrapper |
$res, |
|
|
& |
$continuation = [] |
|
) |
| |
|
private |
- Parameters
-
IResultWrapper | $res | A result set with the ips_item_id and ips_site_id fields set for each row. |
array | &$continuation | Single item ID => site ID pair or empty. |
- Returns
- array[] An associative array mapping item IDs to lists of site IDs.
◆ insertSubscriptionBatch()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::insertSubscriptionBatch |
( |
IDatabase |
$db, |
|
|
array |
$subscriptionsPerItem |
|
) |
| |
|
private |
- Parameters
-
IDatabase | $db | |
array[] | $subscriptionsPerItem | |
- Returns
- int The number of rows inserted.
◆ makeSubscriptionRows()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::makeSubscriptionRows |
( |
|
$itemId, |
|
|
array |
$subscribers |
|
) |
| |
|
private |
Returns a list of rows for insertion, using Database's multi-row insert mechanism.
Each row is represented as [ $itemId, $subscriber ].
- Parameters
-
string | $itemId | |
string[] | $subscribers | |
- Returns
- array[] rows
◆ processSubscriptionBatch()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::processSubscriptionBatch |
( |
& |
$continuation = [] | ) |
|
|
private |
- Parameters
-
- Returns
- int The number of subscriptions inserted.
◆ setExceptionHandler()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::setExceptionHandler |
( |
ExceptionHandler |
$exceptionHandler | ) |
|
◆ setProgressReporter()
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::setProgressReporter |
( |
MessageReporter |
$progressReporter | ) |
|
◆ $batchSize
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$batchSize |
|
private |
◆ $entityIdComposer
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$entityIdComposer |
|
private |
◆ $exceptionHandler
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$exceptionHandler |
|
private |
◆ $loadBalancer
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$loadBalancer |
|
private |
◆ $progressReporter
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$progressReporter |
|
private |
◆ $tableName
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$tableName |
|
private |
◆ $verbosity
Wikibase\Repo\Store\Sql\ChangesSubscriptionTableBuilder::$verbosity |
|
private |
The documentation for this class was generated from the following file: