MediaWiki
REL1_22
|
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 ApiEditPage\execute(), Title\isValidMoveTarget(), and DoubleRedirectJob\run().
const IDBAccessObject::READ_LOCKING = 3 |
Definition at line 50 of file IDBAccessObject.php.
Referenced by Title\moveToInternal().
const IDBAccessObject::READ_NONE = -1 |
Definition at line 56 of file IDBAccessObject.php.
const IDBAccessObject::READ_NORMAL = 0 |
Definition at line 53 of file IDBAccessObject.php.
Referenced by ResourceLoaderWikiModule\getContent(), Skin\getNewtalks(), CoreParserFunctions\pagesize(), RefreshLinksJob\run(), SpecialBookSources\showList(), and Parser\statelessFetchTemplate().