MediaWiki
1.23.3
|
Interface for database access objects. More...
Public Attributes | |
const | READ_LATEST = 1 |
const | READ_LOCKING = 3 |
const | READ_NONE = -1 |
const | READ_NORMAL = 0 |
Interface for database access objects.
Classes using this support a set of constants in a bitfield argument to their data loading functions. In general, objects should assume READ_NORMAL if no flags are explicitly given, though certain objects may assume READ_LATEST for common use case or legacy reasons.
There are three types of reads:
Callers should use READ_NORMAL (or pass in no flags) unless the read determines a write. In theory, such cases may require READ_LOCKING, though to avoid contention, READ_LATEST is often good enough. If UPDATE race condition checks are required on a row and expensive code must run after the row is fetched to determine the UPDATE, it may help to do something like:
Definition at line 47 of file IDBAccessObject.php.
const IDBAccessObject::READ_LATEST = 1 |
Definition at line 49 of file IDBAccessObject.php.
Referenced by WikiPage\convertSelectType(), ApiEditPage\execute(), MessageCache\getMsgFromNamespace(), Title\isValidMoveTarget(), WikiPage\loadPageData(), and DoubleRedirectJob\run().
const IDBAccessObject::READ_LOCKING = 3 |
Definition at line 50 of file IDBAccessObject.php.
Referenced by WikiPage\convertSelectType(), WikiPage\loadLastEdit(), Revision\loadText(), and Title\moveToInternal().
const IDBAccessObject::READ_NONE = -1 |
Definition at line 56 of file IDBAccessObject.php.
Referenced by WikiPage\clear().
const IDBAccessObject::READ_NORMAL = 0 |
Definition at line 53 of file IDBAccessObject.php.
Referenced by WikiPage\convertSelectType(), CoreParserFunctions\getCachedRevisionObject(), ResourceLoaderWikiModule\getContent(), LocalFile\getDescriptionText(), Skin\getNewtalks(), SearchResult\initFromTitle(), WikiPage\loadPageData(), DifferenceEngine\loadRevisionData(), RefreshLinksJob\runForTitle(), and SpecialBookSources\showList().