Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataAccess\DataAccessSettings Class Reference

Provides access to settings relevant for services in the data access component. More...

Public Member Functions

 __construct (int $maxSerializedEntitySizeInKiloBytes, bool $useSearchFields, bool $forceWriteSearchFields, bool $useNormalizedPropertyTerms, array $itemTermsMigrationStages, int $itemSearchMigrationStage=MIGRATION_OLD, int $propertySearchMigrationStage=MIGRATION_OLD)
 
 maxSerializedEntitySizeInBytes ()
 
 useSearchFields ()
 
 forceWriteSearchFields ()
 
 useNormalizedPropertyTerms ()
 Whether to read property terms from the new, normalized schema, rather than from the old wb_terms table.
 
 useNormalizedItemTerms (int $numericItemId)
 Whether to read item terms from the new, normalized schema, rather than from the old wb_terms table.
 
 getItemTermsMigrationStages ()
 
 itemSearchMigrationStage ()
 
 propertySearchMigrationStage ()
 

Public Attributes

const PROPERTY_TERMS_NORMALIZED = true
 
const PROPERTY_TERMS_UNNORMALIZED = false
 
const ITEM_TERMS_UNNORMALIZED_STAGE_ONLY = [ 'max' => MIGRATION_OLD ]
 

Private Attributes

 $maxSerializedEntitySizeInBytes
 
 $useSearchFields
 
 $forceWriteSearchFields
 
 $useNormalizedPropertyTerms
 
 $itemTermsMigrationStages
 
 $itemSearchMigrationStage
 
 $propertySearchMigrationStage
 

Detailed Description

Provides access to settings relevant for services in the data access component.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataAccess\DataAccessSettings::__construct ( int  $maxSerializedEntitySizeInKiloBytes,
bool  $useSearchFields,
bool  $forceWriteSearchFields,
bool  $useNormalizedPropertyTerms,
array  $itemTermsMigrationStages,
int  $itemSearchMigrationStage = MIGRATION_OLD,
int  $propertySearchMigrationStage = MIGRATION_OLD 
)
Parameters
int$maxSerializedEntitySizeInKiloBytes
bool$useSearchFields
bool$forceWriteSearchFields
bool$useNormalizedPropertyTermsTODO: Temporary until we get rid of wb_terms
array$itemTermsMigrationStagesTODO: Temporary until we get rid of wb_terms
int$itemSearchMigrationStageTODO: Temporary until we get rid of wb_terms
int$propertySearchMigrationStageTODO: Temporary until we get rid of wb_terms

Member Function Documentation

◆ forceWriteSearchFields()

Wikibase\DataAccess\DataAccessSettings::forceWriteSearchFields ( )
Returns
bool

◆ getItemTermsMigrationStages()

Wikibase\DataAccess\DataAccessSettings::getItemTermsMigrationStages ( )
Returns
array The mapping of maxId to migration stages of item terms

◆ itemSearchMigrationStage()

Wikibase\DataAccess\DataAccessSettings::itemSearchMigrationStage ( )

◆ maxSerializedEntitySizeInBytes()

Wikibase\DataAccess\DataAccessSettings::maxSerializedEntitySizeInBytes ( )
Returns
int

◆ propertySearchMigrationStage()

Wikibase\DataAccess\DataAccessSettings::propertySearchMigrationStage ( )

◆ useNormalizedItemTerms()

Wikibase\DataAccess\DataAccessSettings::useNormalizedItemTerms ( int  $numericItemId)

Whether to read item terms from the new, normalized schema, rather than from the old wb_terms table.

The new schema is accessed through classes like DatabaseItemTermStoreWriter and PrefetchingItemTermLookup, the old one through classes like TermSqlIndex and BufferingTermIndexTermLookup.

During migraiton of item terms, we have different stages on for different, subsequent ranges of item ids. That is why this method takes a numeric entity id.

◆ useNormalizedPropertyTerms()

Wikibase\DataAccess\DataAccessSettings::useNormalizedPropertyTerms ( )

Whether to read property terms from the new, normalized schema, rather than from the old wb_terms table.

The new schema is accessed through classes like DatabasePropertyTermStoreWriter and PrefetchingPropertyTermLookup, the old one through classes like TermSqlIndex and BufferingTermIndexTermLookup.

This is a temporary setting used during the transition period. Eventually, the normalized schema will be the only one supported.

Returns
bool

◆ useSearchFields()

Wikibase\DataAccess\DataAccessSettings::useSearchFields ( )
Returns
bool

Member Data Documentation

◆ $forceWriteSearchFields

Wikibase\DataAccess\DataAccessSettings::$forceWriteSearchFields
private

◆ $itemSearchMigrationStage

Wikibase\DataAccess\DataAccessSettings::$itemSearchMigrationStage
private

◆ $itemTermsMigrationStages

Wikibase\DataAccess\DataAccessSettings::$itemTermsMigrationStages
private

◆ $maxSerializedEntitySizeInBytes

Wikibase\DataAccess\DataAccessSettings::$maxSerializedEntitySizeInBytes
private

◆ $propertySearchMigrationStage

Wikibase\DataAccess\DataAccessSettings::$propertySearchMigrationStage
private

◆ $useNormalizedPropertyTerms

Wikibase\DataAccess\DataAccessSettings::$useNormalizedPropertyTerms
private

◆ $useSearchFields

Wikibase\DataAccess\DataAccessSettings::$useSearchFields
private

◆ ITEM_TERMS_UNNORMALIZED_STAGE_ONLY

const Wikibase\DataAccess\DataAccessSettings::ITEM_TERMS_UNNORMALIZED_STAGE_ONLY = [ 'max' => MIGRATION_OLD ]

◆ PROPERTY_TERMS_NORMALIZED

const Wikibase\DataAccess\DataAccessSettings::PROPERTY_TERMS_NORMALIZED = true

◆ PROPERTY_TERMS_UNNORMALIZED

const Wikibase\DataAccess\DataAccessSettings::PROPERTY_TERMS_UNNORMALIZED = false

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