Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer Class Reference

Maintenance helper which adds or updates the "unexpectedUnconnectedPage" page property for all relevant pages. More...

+ Collaboration diagram for Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer:

Public Member Functions

 __construct (ClientDomainDb $clientDb, NamespaceChecker $namespaceChecker, int $batchSize=1000)
 
 setProgressReporter (MessageReporter $messageReporter)
 
 setBatchSizeSelectMultiplicator (int $batchSizeSelectMultiplicator)
 Set the batch size multiplicator used to determine the number of page ids to probe when selecting for a batch.
 
 setMinPageId (?int $minPageId)
 Set the page ID at which to start processing (inclusive).
 
 setMaxPageId (?int $maxPageId)
 Set the page ID at which to stop processing (inclusive).
 
 setPageProps ()
 Add the "unexpectedUnconnectedPage" page prop for all relevant pages.
 

Private Member Functions

 processUnexpectedUnconnectedBatch ()
 
 persistUnexpectedUnconnectedBatch (array $pages)
 
 makeUnexpectedUnconnectedRows (array $pages)
 Returns a list of page_props rows for the given pages.
 
 getUnexpectedUnconnectedBatch ()
 
 getMaximumPageIdToCheck ()
 

Private Attributes

ConnectionManager $localConnectionManager
 
ClientDomainDb $clientDb
 
NamespaceChecker $namespaceChecker
 
int $batchSize
 
int $batchSizeSelectMultiplicator = 1000
 
MessageReporter $progressReporter
 
int $position = 0
 
int $maxPageId = null
 

Detailed Description

Maintenance helper which adds or updates the "unexpectedUnconnectedPage" page property for all relevant pages.

Author
Marius Hoch mail@.nosp@m.mari.nosp@m.ushoc.nosp@m.h.de

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::__construct ( ClientDomainDb $clientDb,
NamespaceChecker $namespaceChecker,
int $batchSize = 1000 )
Parameters
ClientDomainDb$clientDb
NamespaceChecker$namespaceChecker
int$batchSize
Exceptions
InvalidArgumentException

Member Function Documentation

◆ getMaximumPageIdToCheck()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::getMaximumPageIdToCheck ( )
private
Returns
int The largest page id we need to bother looking for.

◆ getUnexpectedUnconnectedBatch()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::getUnexpectedUnconnectedBatch ( )
private
Returns
int[][] Page id, page namespace pairs

◆ makeUnexpectedUnconnectedRows()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::makeUnexpectedUnconnectedRows ( array $pages)
private

Returns a list of page_props rows for the given pages.

Parameters
int[][]$pagesPage id, page namespace pairs
Returns
array[] rows

◆ persistUnexpectedUnconnectedBatch()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::persistUnexpectedUnconnectedBatch ( array $pages)
private
Parameters
int[][]$pagesPage id, page namespace pairs
Returns
int The number of pages affected.

◆ processUnexpectedUnconnectedBatch()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::processUnexpectedUnconnectedBatch ( )
private
Returns
int The number of pages affected.

◆ setBatchSizeSelectMultiplicator()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::setBatchSizeSelectMultiplicator ( int $batchSizeSelectMultiplicator)

Set the batch size multiplicator used to determine the number of page ids to probe when selecting for a batch.

Parameters
int$batchSizeSelectMultiplicator

◆ setMaxPageId()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::setMaxPageId ( ?int $maxPageId)

Set the page ID at which to stop processing (inclusive).

This is a rough measure – up to batch size further pages may be processed.

Parameters
int | null$maxPageIdThe page ID, or null for no limit (default).

◆ setMinPageId()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::setMinPageId ( ?int $minPageId)

Set the page ID at which to start processing (inclusive).

Parameters
int | null$minPageIdThe page ID, or null for no offset (default).

◆ setPageProps()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::setPageProps ( )

Add the "unexpectedUnconnectedPage" page prop for all relevant pages.

◆ setProgressReporter()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::setProgressReporter ( MessageReporter $messageReporter)

Member Data Documentation

◆ $batchSize

int Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$batchSize
private

◆ $batchSizeSelectMultiplicator

int Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$batchSizeSelectMultiplicator = 1000
private

◆ $clientDb

ClientDomainDb Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$clientDb
private

◆ $localConnectionManager

ConnectionManager Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$localConnectionManager
private

◆ $maxPageId

int Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$maxPageId = null
private

◆ $namespaceChecker

NamespaceChecker Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$namespaceChecker
private

◆ $position

int Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$position = 0
private

◆ $progressReporter

MessageReporter Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::$progressReporter
private

The documentation for this class was generated from the following file: