Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Lib\Store\LookupConstants Class Reference

Constants used for looking up entities. More...

Public Attributes

const LATEST_FROM_REPLICA = 'replica'
 Flag to use instead of a revision ID to indicate that the latest revision is desired, but a slightly lagged version is acceptable.
 
const LATEST_FROM_REPLICA_WITH_FALLBACK = 'master_fallback'
 Flag used to indicate that loading slightly lagged data is fine (like LATEST_FROM_REPLICA), but in case an entity or revision couldn't be found, we try loading it from master.
 
const LATEST_FROM_MASTER = 'master'
 Flag to use instead of a revision ID to indicate that the latest revision is desired, and it is essential to assert that there really is no newer version, to avoid data loss or conflicts.
 

Detailed Description

Constants used for looking up entities.

Author
toan

Member Data Documentation

◆ LATEST_FROM_MASTER

const Wikibase\Lib\Store\LookupConstants::LATEST_FROM_MASTER = 'master'

Flag to use instead of a revision ID to indicate that the latest revision is desired, and it is essential to assert that there really is no newer version, to avoid data loss or conflicts.

This would generally be the case when loading an entity for editing/modification.

◆ LATEST_FROM_REPLICA

const Wikibase\Lib\Store\LookupConstants::LATEST_FROM_REPLICA = 'replica'

Flag to use instead of a revision ID to indicate that the latest revision is desired, but a slightly lagged version is acceptable.

This would generally be the case when fetching entities for display.

◆ LATEST_FROM_REPLICA_WITH_FALLBACK

const Wikibase\Lib\Store\LookupConstants::LATEST_FROM_REPLICA_WITH_FALLBACK = 'master_fallback'

Flag used to indicate that loading slightly lagged data is fine (like LATEST_FROM_REPLICA), but in case an entity or revision couldn't be found, we try loading it from master.

Note that this flag must only be used in code that is exclusively called from POST requests, since master may reside in a different datacenter and GET requests which trigger reading or writing to master result in an error in that case.


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