Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup Class Reference

Implements an entity repo based on blobs stored in wiki pages on a locally reachable database server. More...

+ Inheritance diagram for Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup:
+ Collaboration diagram for Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup:

Public Member Functions

 __construct (WikiPageEntityMetaDataAccessor $entityMetaDataAccessor, WikiPageEntityDataLoader $entityDataLoader, RevisionStore $revisionStore)
 
- Public Member Functions inherited from Wikibase\Lib\Store\EntityRevisionLookup
 getEntityRevision (EntityId $entityId, $revisionId=0, $mode=LookupConstants::LATEST_FROM_REPLICA)
 Returns the entity revision with the provided id or null if there is no such entity or if access is forbidden. More...
 
 getLatestRevisionId (EntityId $entityId, $mode=LookupConstants::LATEST_FROM_REPLICA)
 Returns the id of the latest revision of the given entity, or false if there is no such entity. More...
 

Private Member Functions

 loadEntity ( $row, $mode=LookupConstants::LATEST_FROM_REPLICA)
 Construct an EntityRevision object from a database row from the revision table. More...
 

Private Attributes

const MAIN_SLOT = 'main'
 
 $entityMetaDataAccessor
 
 $revisionStore
 
 $logger
 
 $entityDataLoader
 

Detailed Description

Implements an entity repo based on blobs stored in wiki pages on a locally reachable database server.

This class also supports memcached (or accelerator) based caching of entities.

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::__construct ( WikiPageEntityMetaDataAccessor  $entityMetaDataAccessor,
WikiPageEntityDataLoader  $entityDataLoader,
RevisionStore  $revisionStore 
)

Member Function Documentation

◆ loadEntity()

Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::loadEntity (   $row,
  $mode = LookupConstants::LATEST_FROM_REPLICA 
)
private

Construct an EntityRevision object from a database row from the revision table.

Parameters
stdClass$rowa row object as returned by WikiPageEntityMetaDataLookup.
string$modeLATEST_FROM_REPLICA, LATEST_FROM_REPLICA_WITH_FALLBACK or LATEST_FROM_MASTER.
Exceptions
StorageException
Returns
array list( EntityRevision|null $entityRevision, EntityRedirect|null $entityRedirect ) with either $entityRevision or $entityRedirect or both being null (but not both being non-null).

Member Data Documentation

◆ $entityDataLoader

Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::$entityDataLoader
private

◆ $entityMetaDataAccessor

Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::$entityMetaDataAccessor
private

◆ $logger

Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::$logger
private

◆ $revisionStore

Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::$revisionStore
private

◆ MAIN_SLOT

const Wikibase\Lib\Store\Sql\WikiPageEntityRevisionLookup::MAIN_SLOT = 'main'
private

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