MediaWiki master
MediaWiki\Installer\NetworkedDatabaseCreator Class Reference

Common code for MySQL and PostgreSQL, which are similar due to the fact that databases can be created by getting a connection to a network service. More...

Inherits MediaWiki\Installer\DatabaseCreator.

Inherited by MediaWiki\Installer\MysqlDatabaseCreator, and MediaWiki\Installer\PostgresDatabaseCreator.

Collaboration diagram for MediaWiki\Installer\NetworkedDatabaseCreator:

Public Member Functions

 createInLoadBalancer (ILoadBalancer $loadBalancer, $database)
 Create a database in the specified LoadBalancer which may be for an external cluster.
 
 createLocally ( $database)
 Create a database in the local cluster or install context.
 
 existsInLoadBalancer (ILoadBalancer $loadBalancer, $database)
 Check if a database exists in the specified LoadBalancer which may be for an external cluster.
 
 existsLocally ( $database)
 Check if a database exists on the local cluster or context.
 

Protected Member Functions

 createInConnection (IDatabase $conn, $database)
 Create a database on a connection.
 
 existsInConnection (IDatabase $conn, $database)
 Determine whether a database exists on a connection.
 
- Protected Member Functions inherited from MediaWiki\Installer\DatabaseCreator
 __construct (ITaskContext $context)
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Installer\DatabaseCreator
static createInstance (ITaskContext $context)
 
- Protected Attributes inherited from MediaWiki\Installer\DatabaseCreator
ITaskContext $context
 

Detailed Description

Common code for MySQL and PostgreSQL, which are similar due to the fact that databases can be created by getting a connection to a network service.

SQLite does not inherit this because its connection handles can't operate on databases other than the one you originally connected to.

Definition at line 18 of file NetworkedDatabaseCreator.php.

Member Function Documentation

◆ createInConnection()

MediaWiki\Installer\NetworkedDatabaseCreator::createInConnection ( IDatabase $conn,
$database )
abstractprotected

Create a database on a connection.

Parameters
IDatabase$conn
string$database
Returns
Status

Reimplemented in MediaWiki\Installer\MysqlDatabaseCreator, and MediaWiki\Installer\PostgresDatabaseCreator.

◆ createInLoadBalancer()

MediaWiki\Installer\NetworkedDatabaseCreator::createInLoadBalancer ( ILoadBalancer $loadBalancer,
$database )

Create a database in the specified LoadBalancer which may be for an external cluster.

Parameters
ILoadBalancer$loadBalancer
string$database
Returns
Status

Reimplemented from MediaWiki\Installer\DatabaseCreator.

Definition at line 41 of file NetworkedDatabaseCreator.php.

◆ createLocally()

MediaWiki\Installer\NetworkedDatabaseCreator::createLocally ( $database)

Create a database in the local cluster or install context.

Parameters
string$database
Returns
Status

Reimplemented from MediaWiki\Installer\DatabaseCreator.

Definition at line 32 of file NetworkedDatabaseCreator.php.

◆ existsInConnection()

MediaWiki\Installer\NetworkedDatabaseCreator::existsInConnection ( IDatabase $conn,
$database )
abstractprotected

Determine whether a database exists on a connection.

Parameters
IDatabase$conn
string$database
Returns
bool

Reimplemented in MediaWiki\Installer\MysqlDatabaseCreator, and MediaWiki\Installer\PostgresDatabaseCreator.

Referenced by MediaWiki\Installer\NetworkedDatabaseCreator\existsInLoadBalancer(), and MediaWiki\Installer\NetworkedDatabaseCreator\existsLocally().

◆ existsInLoadBalancer()

MediaWiki\Installer\NetworkedDatabaseCreator::existsInLoadBalancer ( ILoadBalancer $loadBalancer,
$database )

Check if a database exists in the specified LoadBalancer which may be for an external cluster.

Parameters
ILoadBalancer$loadBalancer
string$database
Returns
bool

Reimplemented from MediaWiki\Installer\DatabaseCreator.

Definition at line 27 of file NetworkedDatabaseCreator.php.

References DB_PRIMARY, MediaWiki\Installer\NetworkedDatabaseCreator\existsInConnection(), and Wikimedia\Rdbms\ILoadBalancer\getConnection().

◆ existsLocally()

MediaWiki\Installer\NetworkedDatabaseCreator::existsLocally ( $database)

Check if a database exists on the local cluster or context.

Parameters
string$database
Returns
bool

Reimplemented from MediaWiki\Installer\DatabaseCreator.

Definition at line 19 of file NetworkedDatabaseCreator.php.

References MediaWiki\Installer\NetworkedDatabaseCreator\existsInConnection().


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