Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder Class Reference

Utility class for rebuilding the wb_property_info table. More...

Public Member Functions

 __construct (PropertyInfoTable $propertyInfoTable, PropertyLookup $propertyLookup, PropertyInfoBuilder $propertyInfoBuilder, EntityNamespaceLookup $entityNamespaceLookup)
 
 setRebuildAll ( $all)
 
 setBatchSize ( $batchSize)
 
 setReporter (MessageReporter $reporter)
 Sets the reporter to use for reporting progress. More...
 
 rebuildPropertyInfo ()
 Rebuild the property info entries. More...
 

Private Member Functions

 updatePropertyInfo (NumericPropertyId $id)
 Updates the property info entry for the given property. More...
 
 reportMessage ( $msg)
 

Private Attributes

 $propertyInfoTable
 
 $propertyLookup
 
 $propertyInfoBuilder
 
 $entityNamespaceLookup
 
 $reporter = null
 
 $shouldUpdateAllEntities = false
 
 $batchSize = 100
 

Detailed Description

Utility class for rebuilding the wb_property_info table.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::__construct ( PropertyInfoTable  $propertyInfoTable,
PropertyLookup  $propertyLookup,
PropertyInfoBuilder  $propertyInfoBuilder,
EntityNamespaceLookup  $entityNamespaceLookup 
)

Member Function Documentation

◆ rebuildPropertyInfo()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::rebuildPropertyInfo ( )

Rebuild the property info entries.

Use the rebuildPropertyInfo.php maintenance script to invoke this from the command line.

Database updates a batched into multiple transactions. Do not call this method within an (explicit) database transaction.

◆ reportMessage()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::reportMessage (   $msg)
private
Parameters
string$msg

◆ setBatchSize()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::setBatchSize (   $batchSize)
Parameters
int$batchSize

◆ setRebuildAll()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::setRebuildAll (   $all)
Parameters
bool$all

◆ setReporter()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::setReporter ( MessageReporter  $reporter)

Sets the reporter to use for reporting progress.

Parameters
MessageReporter$reporter

◆ updatePropertyInfo()

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::updatePropertyInfo ( NumericPropertyId  $id)
private

Updates the property info entry for the given property.

The property is loaded in full using the EntityLookup provide to the constructor.

Exceptions
RuntimeException
Parameters
NumericPropertyId$idthe Property to process

Member Data Documentation

◆ $batchSize

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$batchSize = 100
private

◆ $entityNamespaceLookup

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$entityNamespaceLookup
private

◆ $propertyInfoBuilder

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$propertyInfoBuilder
private

◆ $propertyInfoTable

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$propertyInfoTable
private

◆ $propertyLookup

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$propertyLookup
private

◆ $reporter

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$reporter = null
private

◆ $shouldUpdateAllEntities

Wikibase\Repo\Store\Sql\PropertyInfoTableBuilder::$shouldUpdateAllEntities = false
private

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