MediaWiki
master
|
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.
Referenced by DBAccessObjectUtils\getDBOptions().
const IDBAccessObject::READ_LATEST = 1 |
Definition at line 51 of file IDBAccessObject.php.
Referenced by EmailConfirmation\attemptConfirm(), EmailInvalidation\attemptInvalidate(), MediaWiki\Session\SessionManager\autoCreateUser(), MediaWiki\Auth\AuthManager\autoCreateUser(), NamespaceConflictChecker\canMerge(), UploadBase\checkWarnings(), WikiPage\commitRollback(), Article\delete(), MovePageForm\doSubmit(), ApiEditPage\execute(), ApiSetNotificationTimestamp\execute(), FileRepo\findFile(), EditPage\getBaseRevision(), DBAccessObjectUtils\getDBOptions(), SearchUpdate\getLatestPage(), WikiRevision\importUpload(), BotPassword\invalidateAllPasswordsForUser(), InfoAction\invalidateCache(), MovePage\isValidFileMove(), MovePage\isValidMoveTarget(), Title\isValidMoveTarget(), WikiPage\loadLastEdit(), MovePage\move(), CategoryMembershipChange\notifyCategorization(), CategoryMembershipChangeJob\notifyUpdatesForRevision(), UploadBase\performUpload(), WikiPage\prepareContentForEdit(), BotPassword\removeAllPasswordsForUser(), ThumbnailRenderJob\run(), DeleteLinksJob\run(), CategoryMembershipChangeJob\run(), DoubleRedirectJob\run(), RefreshLinksJob\runForTitle(), MediaWiki\Session\SessionManagerTest\testAutoCreateUser(), CentralIdLookupTest\testCentralIdFromLocalUser(), CentralIdLookupTest\testCentralIdFromName(), CentralIdLookupTest\testLocalUserFromCentralId(), CentralIdLookupTest\testNameFromCentralId(), BotPasswordTest\testSave(), PageArchive\undelete(), and Title\validateFileMoveOperation().
const IDBAccessObject::READ_LOCKING = 3 |
Definition at line 52 of file IDBAccessObject.php.
Referenced by LoginFormPreAuthManager\addNewAccountInternal(), MediaWiki\Auth\AuthManager\beginAccountCreation(), MediaWiki\Auth\AuthManager\continueAccountCreation(), DBAccessObjectUtils\getDBOptions(), WikiPage\loadLastEdit(), MovePage\moveToInternal(), and MediaWiki\Auth\LegacyHookPreAuthenticationProviderTest\testTestUserForCreation().
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 MediaWiki\Auth\AuthManager\autoCreateUser(), MediaWiki\Auth\AuthManager\canCreateAccount(), Article\delete(), ResourceLoaderWikiModule\getContent(), LocalFile\getDescriptionText(), Skin\getNewtalks(), Skin\getRelevantUser(), SearchResult\initFromTitle(), DifferenceEngine\loadRevisionData(), and SpecialBookSources\showList().