Implementation of SubscriptionLookup based on a database table.
More...
Implementation of SubscriptionLookup based on a database table.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Store\Sql\SqlSubscriptionLookup::__construct |
( |
ILoadBalancer |
$dbLoadBalancer | ) |
|
◆ getSubscribers()
Wikibase\Repo\Store\Sql\SqlSubscriptionLookup::getSubscribers |
( |
EntityId |
$idToCheck | ) |
|
Return the existing subscriptions for given Id to check.
- Parameters
-
EntityId | $idToCheck | EntityId to get subscribers |
- Returns
- string[] wiki IDs of wikis subscribed to the given entity
Implements Wikibase\Repo\Store\SubscriptionLookup.
◆ getSubscriptions()
Wikibase\Repo\Store\Sql\SqlSubscriptionLookup::getSubscriptions |
( |
|
$siteId, |
|
|
array |
$entityIds |
|
) |
| |
Returns a list of entities a given site is subscribed to.
- Parameters
-
string | $siteId | Site ID of the client site. |
EntityId[] | $entityIds | The entities we are interested in, or null for "any". |
- Returns
- EntityId[] a list of entity IDs the client wiki is subscribed to. The result is limited to entity ids also present in $entityIds, if given.
Implements Wikibase\Repo\Store\SubscriptionLookup.
◆ querySubscriptions()
Wikibase\Repo\Store\Sql\SqlSubscriptionLookup::querySubscriptions |
( |
IDatabase |
$db, |
|
|
|
$subscriber, |
|
|
array |
$idsToCheck = null |
|
) |
| |
|
private |
For a set of potential subscriptions, returns the existing subscriptions.
- Parameters
-
IDatabase | $db | |
string | $subscriber | |
string[] | null | $idsToCheck | Id strings to check |
- Returns
- string[] Entity ID strings from $subscriptions which $subscriber is subscribed to.
◆ reIndexEntityIds()
Wikibase\Repo\Store\Sql\SqlSubscriptionLookup::reIndexEntityIds |
( |
array |
$entityIds | ) |
|
|
private |
- Parameters
-
- Returns
- EntityId[] The ItemIds from EntityId[], keyed by numeric id.
◆ $dbLoadBalancer
Wikibase\Repo\Store\Sql\SqlSubscriptionLookup::$dbLoadBalancer |
|
private |
The documentation for this class was generated from the following file: