Helper class for DAO classes.
More...
|
static | getDBOptions ( $bitfield) |
| Get an appropriate DB index, options, and fallback DB index for a query.
|
|
static | hasFlags ( $bitfield, $flags) |
|
|
const | READ_NONE = -1 |
| Constants for object loading bitfield flags (higher => higher QoS)
|
|
Helper class for DAO classes.
- Since
- 1.26
Definition at line 29 of file DBAccessObjectUtils.php.
◆ getDBOptions()
static DBAccessObjectUtils::getDBOptions |
( |
|
$bitfield | ) |
|
|
static |
Get an appropriate DB index, options, and fallback DB index for a query.
The fallback DB index and options are to be used if the entity is not found with the initial DB index, typically querying the primary DB to avoid lag
- Parameters
-
int | $bitfield | Bitfield of IDBAccessObject::READ_* constants |
- Returns
- array List of DB indexes and options in this order:
- DB_PRIMARY or DB_REPLICA constant for the initial query
- SELECT options array for the initial query
- DB_PRIMARY constant for the fallback query; null if no fallback should happen
- SELECT options array for the fallback query; empty if no fallback should happen
Definition at line 52 of file DBAccessObjectUtils.php.
References DB_PRIMARY, and DB_REPLICA.
◆ hasFlags()
static DBAccessObjectUtils::hasFlags |
( |
|
$bitfield, |
|
|
|
$flags |
|
) |
| |
|
static |
- Parameters
-
int | $bitfield | |
int | $flags | IDBAccessObject::READ_* constant |
- Returns
- bool Bitfield has flag $flag set
Definition at line 35 of file DBAccessObjectUtils.php.
The documentation for this class was generated from the following file: