Wikibase
MediaWiki Wikibase extension
|
An SQL based usage tracker implementation. More...
Public Member Functions | |
__construct (EntityIdParser $idParser, SessionConsistentConnectionManager $connectionManager, array $disabledUsageAspects, $entityUsagePerPageLimit, $addEntityUsagesBatchSize=500) | |
addUsedEntities ( $pageId, array $usages) | |
replaceUsedEntities ( $pageId, array $usages) | |
pruneUsages ( $pageId) | |
getUsagesForPage ( $pageId) | |
getPagesUsing (array $entityIds, array $aspects=[]) | |
getUnusedEntities (array $entityIds) | |
Private Member Functions | |
newUsageTable (IDatabase $db) | |
reindexEntityUsages (array $usages) | |
Re-indexes the given list of EntityUsages so that each EntityUsage can be found by using its string representation as a key. | |
handleDisabledUsages (array $usages) | |
Private Attributes | |
$idParser | |
$connectionManager | |
$disabledUsageAspects | |
$entityUsagePerPageLimit | |
$addEntityUsagesBatchSize | |
An SQL based usage tracker implementation.
Wikibase\Client\Usage\Sql\SqlUsageTracker::__construct | ( | EntityIdParser | $idParser, |
SessionConsistentConnectionManager | $connectionManager, | ||
array | $disabledUsageAspects, | ||
$entityUsagePerPageLimit, | |||
$addEntityUsagesBatchSize = 500 |
|||
) |
EntityIdParser | $idParser | |
SessionConsistentConnectionManager | $connectionManager | |
string[] | $disabledUsageAspects | |
int | $entityUsagePerPageLimit | |
int | $addEntityUsagesBatchSize |
Wikibase\Client\Usage\Sql\SqlUsageTracker::addUsedEntities | ( | $pageId, | |
array | $usages | ||
) |
int | $pageId | |
EntityUsage[] | $usages |
InvalidArgumentException | |
UsageTrackerException |
Implements Wikibase\Client\Usage\UsageTracker.
Wikibase\Client\Usage\Sql\SqlUsageTracker::getPagesUsing | ( | array | $entityIds, |
array | $aspects = [] |
||
) |
EntityId[] | $entityIds | |
string[] | $aspects |
UsageTrackerException |
Implements Wikibase\Client\Usage\UsageLookup.
Wikibase\Client\Usage\Sql\SqlUsageTracker::getUnusedEntities | ( | array | $entityIds | ) |
EntityId[] | $entityIds |
UsageTrackerException |
Implements Wikibase\Client\Usage\UsageLookup.
Wikibase\Client\Usage\Sql\SqlUsageTracker::getUsagesForPage | ( | $pageId | ) |
int | $pageId |
UsageTrackerException |
Implements Wikibase\Client\Usage\UsageLookup.
|
private |
EntityUsage[] | $usages |
InvalidArgumentException |
|
private |
IDatabase | $db |
Wikibase\Client\Usage\Sql\SqlUsageTracker::pruneUsages | ( | $pageId | ) |
int | $pageId |
UsageTrackerException |
Implements Wikibase\Client\Usage\UsageTracker.
|
private |
Re-indexes the given list of EntityUsages so that each EntityUsage can be found by using its string representation as a key.
EntityUsage[] | $usages |
InvalidArgumentException |
Wikibase\Client\Usage\Sql\SqlUsageTracker::replaceUsedEntities | ( | $pageId, | |
array | $usages | ||
) |
int | $pageId | |
EntityUsage[] | $usages |
InvalidArgumentException | |
UsageTrackerException |
Implements Wikibase\Client\Usage\UsageTracker.
|
private |
|
private |
|
private |
|
private |
|
private |