MediaWiki master
Wikimedia\Rdbms\Database\IDatabaseFlags Interface Reference

Inherited by Wikimedia\Rdbms\Database\DatabaseFlags, and Wikimedia\Rdbms\IReadableDatabase.

Public Member Functions

 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.
 
 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.
 

Public Attributes

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.
 

Detailed Description

Definition at line 25 of file IDatabaseFlags.php.

Member Function Documentation

◆ clearFlag()

Wikimedia\Rdbms\Database\IDatabaseFlags::clearFlag ( $flag,
$remember = self::REMEMBER_NOTHING )

Clear a flag for this connection.

Parameters
int$flagOne of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX)
string$rememberIDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]

Implemented in Wikimedia\Rdbms\Database, Wikimedia\Rdbms\Database\DatabaseFlags, and Wikimedia\Rdbms\DBConnRef.

◆ getFlag()

Wikimedia\Rdbms\Database\IDatabaseFlags::getFlag ( $flag)

Returns a boolean whether the flag $flag is set for this connection.

Parameters
int$flagOne of the class IDatabase::DBO_* constants
Returns
bool

Implemented in Wikimedia\Rdbms\Database, Wikimedia\Rdbms\Database\DatabaseFlags, and Wikimedia\Rdbms\DBConnRef.

◆ restoreFlags()

Wikimedia\Rdbms\Database\IDatabaseFlags::restoreFlags ( $state = self::RESTORE_PRIOR)

Restore the flags to their prior state before the last setFlag/clearFlag call.

Parameters
string$stateIDatabase::RESTORE_* constant. [default: RESTORE_PRIOR]
Since
1.28

Implemented in Wikimedia\Rdbms\Database, Wikimedia\Rdbms\Database\DatabaseFlags, and Wikimedia\Rdbms\DBConnRef.

◆ setFlag()

Wikimedia\Rdbms\Database\IDatabaseFlags::setFlag ( $flag,
$remember = self::REMEMBER_NOTHING )

Set a flag for this connection.

Parameters
int$flagOne of (IDatabase::DBO_DEBUG, IDatabase::DBO_TRX)
string$rememberIDatabase::REMEMBER_* constant [default: REMEMBER_NOTHING]

Implemented in Wikimedia\Rdbms\Database, Wikimedia\Rdbms\Database\DatabaseFlags, and Wikimedia\Rdbms\DBConnRef.

Referenced by MediaWiki\Installer\DatabaseUpdater\__construct().

Member Data Documentation

◆ DBO_COMPRESS

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_COMPRESS = 512

Enable compression in connection protocol.

Definition at line 58 of file IDatabaseFlags.php.

◆ DBO_DDLMODE

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_DDLMODE = 128

Schema file mode; was used by Oracle.

Definition at line 51 of file IDatabaseFlags.php.

◆ DBO_DEBUG

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_DEBUG = 1

Enable debug logging of all SQL queries.

Definition at line 37 of file IDatabaseFlags.php.

◆ DBO_DEFAULT

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_DEFAULT = 16

Join load balancer transaction rounds (which control DBO_TRX) in non-CLI mode.

Definition at line 45 of file IDatabaseFlags.php.

◆ DBO_GAUGE

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_GAUGE = 1024

Optimize connection for guaging server state (e.g.

ILoadBalancer::CONN_UNTRACKED_GAUGE)

Definition at line 60 of file IDatabaseFlags.php.

◆ DBO_IGNORE

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_IGNORE = 4

Unused since 1.31.

Definition at line 41 of file IDatabaseFlags.php.

◆ DBO_NOBUFFER

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_NOBUFFER = 2

Unused since 1.34.

Definition at line 39 of file IDatabaseFlags.php.

◆ DBO_PERSISTENT

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_PERSISTENT = 32

Use DB persistent connections if possible.

Definition at line 47 of file IDatabaseFlags.php.

◆ DBO_SSL

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_SSL = 256

Enable SSL/TLS in connection protocol.

Deprecated
since 1.39 use 'ssl' parameter

Definition at line 56 of file IDatabaseFlags.php.

◆ DBO_SYSDBA

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_SYSDBA = 64

DBA session mode; was used by Oracle.

Definition at line 49 of file IDatabaseFlags.php.

◆ DBO_TRX

const Wikimedia\Rdbms\Database\IDatabaseFlags::DBO_TRX = 8

Automatically start a transaction before running a query if none is active.

Definition at line 43 of file IDatabaseFlags.php.

◆ REMEMBER_NOTHING

const Wikimedia\Rdbms\Database\IDatabaseFlags::REMEMBER_NOTHING = ''

Do not remember the prior flags.

Definition at line 28 of file IDatabaseFlags.php.

◆ REMEMBER_PRIOR

const Wikimedia\Rdbms\Database\IDatabaseFlags::REMEMBER_PRIOR = 'remember'

Remember the prior flags.

Definition at line 30 of file IDatabaseFlags.php.

◆ RESTORE_INITIAL

const Wikimedia\Rdbms\Database\IDatabaseFlags::RESTORE_INITIAL = 'initial'

Restore to the initial flag state.

Definition at line 34 of file IDatabaseFlags.php.

◆ RESTORE_PRIOR

const Wikimedia\Rdbms\Database\IDatabaseFlags::RESTORE_PRIOR = 'prior'

Restore to the prior flag state.

Definition at line 32 of file IDatabaseFlags.php.


The documentation for this interface was generated from the following file: