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, ILBFactory $lbFactory, $batchSize=1000, $usageTableName=null) | |
setProgressReporter (MessageReporter $progressReporter) | |
setExceptionHandler (ExceptionHandler $exceptionHandler) | |
fillUsageTable ( $fromPageId=0) | |
Fill the usage table with rows based on entries in page_props. More... | |
Private Member Functions | |
processUsageBatch (&$fromPageId=0) | |
insertUsageBatch (IDatabase $db, array $entityPerPage) | |
getUsageBatch (IDatabase $db, $fromPageId=0) | |
slurpEntityIds (IResultWrapper $res) | |
Private Attributes | |
$idParser | |
$lbFactory | |
$usageTableName | |
$batchSize | |
$exceptionHandler | |
$progressReporter | |
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, |
ILBFactory | $lbFactory, | ||
$batchSize = 1000 , |
|||
$usageTableName = null |
|||
) |
EntityIdParser | $idParser | |
ILBFactory | $lbFactory | |
int | $batchSize | defaults to 1000 |
string | null | $usageTableName | defaults to wbc_entity_usage |
InvalidArgumentException |
Wikibase\Client\Usage\Sql\EntityUsageTableBuilder::fillUsageTable | ( | $fromPageId = 0 | ) |
Fill the usage table with rows based on entries in page_props.
int | $fromPageId |
|
private |
IDatabase | $db | |
int | $fromPageId |
|
private |
IDatabase | $db | |
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 |
IResultWrapper | $res |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |