Wikibase
MediaWiki Wikibase extension
Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer Class Reference

Maintenance helper which adds the "unexpectedUnconnectedPage" page property to all relevant pages. More...

Public Member Functions

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

Private Member Functions

 processUnexpectedUnconnectedBatch ()
 
 insertUnexpectedUnconnectedBatch (array $pages)
 
 makeUnexpectedUnconnectedRows (array $pages)
 Returns a list of rows for insertion, using DatabaseBase's multi-row insert mechanism. More...
 
 getUnexpectedUnconnectedBatch ()
 
 getMaximumPageIdToCheck ()
 

Private Attributes

 $localConnectionManager
 
 $clientDb
 
 $namespaceChecker
 
 $batchSize
 
 $batchSizeSelectMultiplicator = 1000
 
 $progressReporter
 
 $position = 0
 
 $maxPageId = null
 

Detailed Description

Maintenance helper which adds the "unexpectedUnconnectedPage" page property to 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

◆ insertPageProp()

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

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

◆ insertUnexpectedUnconnectedBatch()

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

◆ makeUnexpectedUnconnectedRows()

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

Returns a list of rows for insertion, using DatabaseBase's multi-row insert mechanism.

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

◆ processUnexpectedUnconnectedBatch()

Wikibase\Client\Store\Sql\UnexpectedUnconnectedPagePrimer::processUnexpectedUnconnectedBatch ( )
private
Returns
int Number of changes performed.

◆ 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).

Member Data Documentation

◆ $batchSize

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

◆ $batchSizeSelectMultiplicator

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

◆ $clientDb

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

◆ $localConnectionManager

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

◆ $maxPageId

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

◆ $namespaceChecker

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

◆ $position

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

◆ $progressReporter

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

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