Wikibase
MediaWiki Wikibase extension
|
Interface for services giving access to meta data about one or more entities as needed for loading entities from WikiPages (via Revision) or to verify an entity against page.page_latest. More...
Public Member Functions | |
loadRevisionInformation (array $entityIds, $mode) | |
Looks up meta data for the given entityId(s) as needed to lookup the latest revision id of an entity or to load entity content from a MediaWiki revision. | |
loadRevisionInformationByRevisionId (EntityId $entityId, $revisionId, $mode=LookupConstants::LATEST_FROM_MASTER) | |
Looks up meta data for the given entityId-revisionId pair as needed to lookup the latest revision of the entity or to load entity content from a MediaWiki revision. | |
loadLatestRevisionIds (array $entityIds, $mode) | |
Looks up the latest revision ID(s) for the given entityId(s). | |
Interface for services giving access to meta data about one or more entities as needed for loading entities from WikiPages (via Revision) or to verify an entity against page.page_latest.
Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor::loadLatestRevisionIds | ( | array | $entityIds, |
$mode ) |
Looks up the latest revision ID(s) for the given entityId(s).
Returns an array of integer revision IDs
EntityId[] | $entityIds | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
Implemented in Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor, and Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor.
Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor::loadRevisionInformation | ( | array | $entityIds, |
$mode ) |
Looks up meta data for the given entityId(s) as needed to lookup the latest revision id of an entity or to load entity content from a MediaWiki revision.
Returns an array of stdClass with the following fields: 'rev_id', 'rev_timestamp', 'page_latest'.
EntityId[] | $entityIds | |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) |
Implemented in Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor, and Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor.
Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataAccessor::loadRevisionInformationByRevisionId | ( | EntityId | $entityId, |
$revisionId, | |||
$mode = LookupConstants::LATEST_FROM_MASTER ) |
Looks up meta data for the given entityId-revisionId pair as needed to lookup the latest revision of the entity or to load entity content from a MediaWiki revision.
Included fields are 'rev_id', 'rev_timestamp', 'page_latest'. Given that revision are immutable, this function will always try to load a revision from replica first and only use the master (with LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER) in case the revision couldn't be found.
EntityId | $entityId | |
int | $revisionId | Revision id to fetch data about, must be an integer greater than 0. |
string | $mode | ( LookupConstants::LATEST_FROM_REPLICA, LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK or LookupConstants::LATEST_FROM_MASTER). |
Implemented in Wikibase\Lib\Store\Sql\PrefetchingWikiPageEntityMetaDataAccessor, Wikibase\Lib\Store\Sql\TypeDispatchingWikiPageEntityMetaDataAccessor, and Wikibase\Lib\Store\Sql\WikiPageEntityMetaDataLookup.