Wikibase
MediaWiki Wikibase extension
|
Implements initial population (priming) for the wbc_entity_usage table, based on "wikibase_item" entries in the page_props table. More...
Public Member Functions | |
__construct (EntityIdParser $idParser, ClientDomainDb $domainDb, int $batchSize=1000, ?string $usageTableName=null) | |
setProgressReporter (MessageReporter $progressReporter) | |
setExceptionHandler (ExceptionHandler $exceptionHandler) | |
fillUsageTable (int $fromPageId=0) | |
Fill the usage table with rows based on entries in page_props. | |
Private Member Functions | |
processUsageBatch (int &$fromPageId=0) | |
insertUsageBatch (IDatabase $dbw, array $entityPerPage) | |
getUsageBatch (IReadableDatabase $db, int $fromPageId=0) | |
slurpEntityIds (IResultWrapper $res) | |
Private Attributes | |
$idParser | |
$usageTableName | |
$batchSize | |
$exceptionHandler | |
$progressReporter | |
$domainDb | |
Implements initial population (priming) for the wbc_entity_usage table, based on "wikibase_item" entries in the page_props table.
All usages will be marked as EntityUsage::ALL_USAGE ("X"), since we do not know which aspects are actually used beyond the sitelinks aspect. The "X" aspect will cause the page to be purged for any kind of change to the respective data item; once the page is re-parse, the "X" aspect would be removed with whatever aspect(s) are actually used on the page.
Wikibase\Client\Usage\Sql\EntityUsageTableBuilder::__construct | ( | EntityIdParser | $idParser, |
ClientDomainDb | $domainDb, | ||
int | $batchSize = 1000, | ||
?string | $usageTableName = null ) |
InvalidArgumentException |
Wikibase\Client\Usage\Sql\EntityUsageTableBuilder::fillUsageTable | ( | int | $fromPageId = 0 | ) |
Fill the usage table with rows based on entries in page_props.
|
private |
|
private |
IDatabase | $dbw | |
EntityId[] | $entityPerPage |
|
private |
int | &$fromPageId | Page ID to start from. Will be updated with the next unprocessed ID, to be used as the starting point of the next batch. Pages are processed in order of their ID. |
Wikibase\Client\Usage\Sql\EntityUsageTableBuilder::setExceptionHandler | ( | ExceptionHandler | $exceptionHandler | ) |
Wikibase\Client\Usage\Sql\EntityUsageTableBuilder::setProgressReporter | ( | MessageReporter | $progressReporter | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |