Wikibase
MediaWiki Wikibase extension
|
An SQL based usage tracker implementation. More...
Public Member Functions | |
__construct (EntityIdParser $idParser, SessionConsistentConnectionManager $connectionManager, array $disabledUsageAspects, int $entityUsagePerPageLimit, int $addEntityUsagesBatchSize=500) | |
addUsedEntities (int $pageId, array $usages) | |
replaceUsedEntities (int $pageId, array $usages) | |
pruneUsages (int $pageId) | |
getUsagesForPage (int $pageId) | |
getPagesUsing (array $entityIds, array $aspects=[]) | |
getUnusedEntities (array $entityIds) | |
Private Member Functions | |
newUsageTable (?IDatabase $db=null) | |
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 | |
EntityIdParser | $idParser |
SessionConsistentConnectionManager | $connectionManager |
array | $disabledUsageAspects |
int | $entityUsagePerPageLimit |
The limit to issue a warning when entity usage per page hit that limit. | |
int | $addEntityUsagesBatchSize |
The batch size when adding entity usage. | |
An SQL based usage tracker implementation.
Wikibase\Client\Usage\Sql\SqlUsageTracker::__construct | ( | EntityIdParser | $idParser, |
SessionConsistentConnectionManager | $connectionManager, | ||
array | $disabledUsageAspects, | ||
int | $entityUsagePerPageLimit, | ||
int | $addEntityUsagesBatchSize = 500 ) |
EntityIdParser | $idParser | |
SessionConsistentConnectionManager | $connectionManager | |
string[] | $disabledUsageAspects | |
int | $entityUsagePerPageLimit | |
int | $addEntityUsagesBatchSize |
Wikibase\Client\Usage\Sql\SqlUsageTracker::addUsedEntities | ( | int | $pageId, |
array | $usages ) |
int | $pageId | |
EntityUsage[] | $usages |
InvalidArgumentException |
Implements Wikibase\Client\Usage\UsageTracker.
Wikibase\Client\Usage\Sql\SqlUsageTracker::getPagesUsing | ( | array | $entityIds, |
array | $aspects = [] ) |
EntityId[] | $entityIds | |
string[] | $aspects |
Implements Wikibase\Client\Usage\UsageLookup.
Wikibase\Client\Usage\Sql\SqlUsageTracker::getUnusedEntities | ( | array | $entityIds | ) |
EntityId[] | $entityIds |
Implements Wikibase\Client\Usage\UsageLookup.
Wikibase\Client\Usage\Sql\SqlUsageTracker::getUsagesForPage | ( | int | $pageId | ) |
int | $pageId |
Implements Wikibase\Client\Usage\UsageLookup.
|
private |
EntityUsage[] | $usages |
InvalidArgumentException |
|
private |
Wikibase\Client\Usage\Sql\SqlUsageTracker::pruneUsages | ( | int | $pageId | ) |
int | $pageId |
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 | ( | int | $pageId, |
array | $usages ) |
int | $pageId | |
EntityUsage[] | $usages |
InvalidArgumentException |
Implements Wikibase\Client\Usage\UsageTracker.
|
private |
The batch size when adding entity usage.
|
private |
|
private |
|
private |
The limit to issue a warning when entity usage per page hit that limit.
|
private |