MediaWiki
REL1_24
|
Interface for database access objects. More...
Public Attributes | |
const | READ_EXCLUSIVE = 7 |
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 four 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 49 of file IDBAccessObject.php.
const IDBAccessObject::READ_EXCLUSIVE = 7 |
Definition at line 53 of file IDBAccessObject.php.
const IDBAccessObject::READ_LATEST = 1 |
Definition at line 51 of file IDBAccessObject.php.
Referenced by ApiEditPage\execute().
const IDBAccessObject::READ_LOCKING = 3 |
Definition at line 52 of file IDBAccessObject.php.
const IDBAccessObject::READ_NONE = -1 |
Definition at line 59 of file IDBAccessObject.php.
const IDBAccessObject::READ_NORMAL = 0 |
Definition at line 56 of file IDBAccessObject.php.
Referenced by CoreParserFunctions\getCachedRevisionObject(), ResourceLoaderWikiModule\getContent(), Skin\getNewtalks(), RefreshLinksJob\runForTitle(), and SpecialBookSources\showList().