MediaWiki master
|
Inherits Wikimedia\Rdbms\Database\IDatabaseFlags.
Public Member Functions | |
__construct ( $flags) | |
clearFlag ( $flag, $remember=self::REMEMBER_NOTHING) | |
Clear a flag for this connection. | |
getFlag ( $flag) | |
Returns a boolean whether the flag $flag is set for this connection. | |
hasApplicableImplicitTrxFlag (int $queryFlags) | |
hasImplicitTrxFlag () | |
restoreFlags ( $state=self::RESTORE_PRIOR) | |
Restore the flags to their prior state before the last setFlag/clearFlag call. | |
setFlag ( $flag, $remember=self::REMEMBER_NOTHING) | |
Set a flag for this connection. | |
Static Public Member Functions | |
static | contains (int $flags, int $bit) |
Protected Attributes | |
int | $flags |
Current bit field of class DBO_* constants. | |
Additional Inherited Members | |
Public Attributes inherited from Wikimedia\Rdbms\Database\IDatabaseFlags | |
const | DBO_COMPRESS = 512 |
Enable compression in connection protocol. | |
const | DBO_DDLMODE = 128 |
Schema file mode; was used by Oracle. | |
const | DBO_DEBUG = 1 |
Enable debug logging of all SQL queries. | |
const | DBO_DEFAULT = 16 |
Join load balancer transaction rounds (which control DBO_TRX) in non-CLI mode. | |
const | DBO_GAUGE = 1024 |
Optimize connection for guaging server state (e.g. | |
const | DBO_IGNORE = 4 |
Unused since 1.31. | |
const | DBO_NOBUFFER = 2 |
Unused since 1.34. | |
const | DBO_PERSISTENT = 32 |
Use DB persistent connections if possible. | |
const | DBO_SSL = 256 |
Enable SSL/TLS in connection protocol. | |
const | DBO_SYSDBA = 64 |
DBA session mode; was used by Oracle. | |
const | DBO_TRX = 8 |
Automatically start a transaction before running a query if none is active. | |
const | REMEMBER_NOTHING = '' |
Do not remember the prior flags. | |
const | REMEMBER_PRIOR = 'remember' |
Remember the prior flags. | |
const | RESTORE_INITIAL = 'initial' |
Restore to the initial flag state. | |
const | RESTORE_PRIOR = 'prior' |
Restore to the prior flag state. | |
Wikimedia\Rdbms\Database\DatabaseFlags::__construct | ( | $flags | ) |
Definition at line 48 of file DatabaseFlags.php.
References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.
Wikimedia\Rdbms\Database\DatabaseFlags::clearFlag | ( | $flag, | |
$remember = self::REMEMBER_NOTHING ) |
Clear a flag for this connection.
int | $flag | One of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX) |
string | $remember | IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING] |
Implements Wikimedia\Rdbms\Database\IDatabaseFlags.
Definition at line 66 of file DatabaseFlags.php.
References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.
|
static |
int | $flags | A bit field of flags |
int | $bit | Bit flag constant |
Definition at line 102 of file DatabaseFlags.php.
References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.
Referenced by Wikimedia\Rdbms\Database\DatabaseFlags\hasApplicableImplicitTrxFlag().
Wikimedia\Rdbms\Database\DatabaseFlags::getFlag | ( | $flag | ) |
Returns a boolean whether the flag $flag is set for this connection.
int | $flag | One of the class IDatabase::DBO_* constants |
Implements Wikimedia\Rdbms\Database\IDatabaseFlags.
Definition at line 93 of file DatabaseFlags.php.
Referenced by Wikimedia\Rdbms\Database\DatabaseFlags\hasImplicitTrxFlag().
Wikimedia\Rdbms\Database\DatabaseFlags::hasApplicableImplicitTrxFlag | ( | int | $queryFlags | ) |
int | $queryFlags | A bit field of ISQLPlatform::QUERY_* constants |
Definition at line 110 of file DatabaseFlags.php.
References Wikimedia\Rdbms\Database\DatabaseFlags\contains(), and Wikimedia\Rdbms\Database\DatabaseFlags\hasImplicitTrxFlag().
Wikimedia\Rdbms\Database\DatabaseFlags::hasImplicitTrxFlag | ( | ) |
Definition at line 122 of file DatabaseFlags.php.
References Wikimedia\Rdbms\Database\DatabaseFlags\getFlag().
Referenced by Wikimedia\Rdbms\Database\DatabaseFlags\hasApplicableImplicitTrxFlag().
Wikimedia\Rdbms\Database\DatabaseFlags::restoreFlags | ( | $state = self::RESTORE_PRIOR | ) |
Restore the flags to their prior state before the last setFlag/clearFlag call.
string | $state | IDatabase::RESTORE_* constant. [default: RESTORE_PRIOR] |
Implements Wikimedia\Rdbms\Database\IDatabaseFlags.
Definition at line 80 of file DatabaseFlags.php.
Wikimedia\Rdbms\Database\DatabaseFlags::setFlag | ( | $flag, | |
$remember = self::REMEMBER_NOTHING ) |
Set a flag for this connection.
int | $flag | One of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX) |
string | $remember | IDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING] |
Implements Wikimedia\Rdbms\Database\IDatabaseFlags.
Definition at line 52 of file DatabaseFlags.php.
References Wikimedia\Rdbms\Database\DatabaseFlags\$flags.
|
protected |
Current bit field of class DBO_* constants.
Definition at line 32 of file DatabaseFlags.php.
Referenced by Wikimedia\Rdbms\Database\DatabaseFlags\__construct(), Wikimedia\Rdbms\Database\DatabaseFlags\clearFlag(), Wikimedia\Rdbms\Database\DatabaseFlags\contains(), and Wikimedia\Rdbms\Database\DatabaseFlags\setFlag().