Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Store\Sql\Terms\DatabaseEntityTermsTableProvider Class Reference

Helper to prepare joins necessary to select terms from new term store in db. More...

Public Member Functions

 __construct (string $entityType)
 
 getEntityTermsTableAndJoinConditions (string $alias)
 Constructs a table along the necessary joins with new store tables for selecting entity terms referenced in $entityTermsTable through $entityTermsJoinColumn column.
 

Private Attributes

 $entityTermsTable
 
 $entityTermsJoinColumn
 
 $entityIdColumn
 

Detailed Description

Helper to prepare joins necessary to select terms from new term store in db.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Store\Sql\Terms\DatabaseEntityTermsTableProvider::__construct ( string  $entityType)
Parameters
string$entityTypeone of the supported types: Item::ENTITY_TYPE or Property::ENTITY_TYPE

Member Function Documentation

◆ getEntityTermsTableAndJoinConditions()

Wikibase\Repo\Store\Sql\Terms\DatabaseEntityTermsTableProvider::getEntityTermsTableAndJoinConditions ( string  $alias)

Constructs a table along the necessary joins with new store tables for selecting entity terms referenced in $entityTermsTable through $entityTermsJoinColumn column.

Parameters
string$aliasAlias for the entity terms table This will also be used as a prefix for inner aliases in join statements. The following aliases can be used externally to refer to these tables in furthe SQL statements:
  • {$alias}: alias for entity terms table (determined by $this->entityTermsTable)
  • {$alias}TermInLang: alias for wbt_terms_in_lang table
  • {$alias}TextInLang: alias for wbt_text_in_lang table
  • {$alias}Text: alias for wbt_text table
Returns
array with the following elements in order:
  • table: the final table (array, including the joins)
  • join conditions
  • entity id column: the column name that contains the entity id within the top-most entity terms table this can be accessed inside other conditions as: "{$alias}.{$entityIdColumn}"

Member Data Documentation

◆ $entityIdColumn

Wikibase\Repo\Store\Sql\Terms\DatabaseEntityTermsTableProvider::$entityIdColumn
private

◆ $entityTermsJoinColumn

Wikibase\Repo\Store\Sql\Terms\DatabaseEntityTermsTableProvider::$entityTermsJoinColumn
private

◆ $entityTermsTable

Wikibase\Repo\Store\Sql\Terms\DatabaseEntityTermsTableProvider::$entityTermsTable
private

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