MediaWiki master
|
Class to handle database/schema/prefix specifications for IDatabase. More...
Inherits Stringable.
Public Member Functions | |
__construct ( $database, $schema, $prefix) | |
__toString () | |
equals ( $other) | |
getDatabase () | |
getId () | |
getSchema () | |
getTablePrefix () | |
isCompatible ( $other) | |
Check whether the domain $other meets the specifications of this domain. | |
isUnspecified () | |
Static Public Member Functions | |
static | newFromId ( $domain) |
static | newUnspecified () |
Class to handle database/schema/prefix specifications for IDatabase.
The components of a database domain are defined as follows:
If an RDBMS does not support server-side collections of table collections (schemas) then the schema component should be null and the "database" component treated as a collection of exactly one table collection (the implied schema for that "database").
The above criteria should determine how components should map to RDBMS specific keywords rather than "database"/"schema" always mapping to "DATABASE"/"SCHEMA" as used by the RDBMS.
Definition at line 42 of file DatabaseDomain.php.
Wikimedia\Rdbms\DatabaseDomain::__construct | ( | $database, | |
$schema, | |||
$prefix ) |
string | null | $database | Database name |
string | null | $schema | Schema name |
string | $prefix | Table prefix |
Definition at line 58 of file DatabaseDomain.php.
Wikimedia\Rdbms\DatabaseDomain::__toString | ( | ) |
Definition at line 237 of file DatabaseDomain.php.
Wikimedia\Rdbms\DatabaseDomain::equals | ( | $other | ) |
DatabaseDomain | string | $other |
Definition at line 131 of file DatabaseDomain.php.
Wikimedia\Rdbms\DatabaseDomain::getDatabase | ( | ) |
Definition at line 184 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseMySQL\doSelectDomain(), Wikimedia\Rdbms\DatabasePostgres\doSelectDomain(), Wikimedia\Rdbms\DatabaseSqlite\doSelectDomain(), and Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection().
Wikimedia\Rdbms\DatabaseDomain::getId | ( | ) |
Definition at line 205 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection().
Wikimedia\Rdbms\DatabaseDomain::getSchema | ( | ) |
Definition at line 191 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseMySQL\doSelectDomain(), Wikimedia\Rdbms\DatabasePostgres\doSelectDomain(), Wikimedia\Rdbms\DatabaseSqlite\doSelectDomain(), and Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection().
Wikimedia\Rdbms\DatabaseDomain::getTablePrefix | ( | ) |
Definition at line 198 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DatabaseMySQL\doSelectDomain(), Wikimedia\Rdbms\DatabasePostgres\doSelectDomain(), Wikimedia\Rdbms\DatabaseSqlite\doSelectDomain(), and Wikimedia\Rdbms\LoadBalancer\reallyOpenConnection().
Wikimedia\Rdbms\DatabaseDomain::isCompatible | ( | $other | ) |
Check whether the domain $other meets the specifications of this domain.
If this instance has a null database specifier, then $other can have any database specifier, including null. This is likewise true if the schema specifier is null. This is not transitive like equals() since a domain that explicitly wants a certain database or schema cannot be satisfied by one of another (nor null). If the prefix is empty and the DB and schema are both null, then the entire domain is considered unspecified, and any prefix of $other is considered compatible.
DatabaseDomain | string | $other |
Definition at line 157 of file DatabaseDomain.php.
Wikimedia\Rdbms\DatabaseDomain::isUnspecified | ( | ) |
|
static |
DatabaseDomain | string | $domain | Result of DatabaseDomain::toString() |
Definition at line 79 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\DBConnRef\__construct().
|
static |
Definition at line 123 of file DatabaseDomain.php.
Referenced by Wikimedia\Rdbms\Platform\SQLPlatform\__construct().