Database

Primary front-controller for the database system.

This class is uninstantiatable and un-extendable. It acts to encapsulate all control and shepherding of database connections into a single location without the use of globals.

Hierarchy

File

core/lib/Drupal/Core/Database/Database.php, line 12

Namespace

Drupal\Core\Database

Members

Name Modifiers Type Description
Database::$activeKey static protected property The key of the currently active database connection.
Database::$connections static protected property An nested array of all active connections. It is keyed by database name and target.
Database::$databaseInfo static protected property A processed copy of the database connection information from settings.php.
Database::$ignoreTargets static protected property A list of key/target credentials to simply ignore.
Database::$logs static protected property An array of active query log objects.
Database::addConnectionInfo final public static function Adds database connection information for a given key/target.
Database::closeConnection public static function Closes a connection to the server specified by the given key and target.
Database::convertDbUrlToConnectionInfo public static function Converts a URL to a database connection info array.
Database::getAllConnectionInfo final public static function Gets connection information for all available databases.
Database::getConnection final public static function Gets the connection object for the specified database key and target.
Database::getConnectionInfo final public static function Gets information on the specified database connection.
Database::getConnectionInfoAsUrl public static function Gets database connection info as a URL.
Database::getLog final public static function Retrieves the queries logged on for given logging key.
Database::ignoreTarget public static function Instructs the system to temporarily ignore a given key/target.
Database::isActiveConnection final public static function Determines if there is an active connection.
Database::openConnection final protected static function Opens a connection to the server specified by the given key and target.
Database::parseConnectionInfo final public static function Process the configuration file for database information.
Database::removeConnection final public static function Remove a connection and its corresponding connection information.
Database::renameConnection final public static function Rename a connection and its corresponding connection information.
Database::RETURN_AFFECTED constant Flag to indicate a query call should return the number of affected rows.
Database::RETURN_INSERT_ID constant Flag to indicate a query call should return the "last insert id".
Database::RETURN_NULL constant Flag to indicate a query call should simply return NULL.
Database::RETURN_STATEMENT constant Flag to indicate a query call should return the prepared statement.
Database::setActiveConnection final public static function Sets the active connection to the specified key.
Database::setMultipleConnectionInfo final public static function Sets connection information for multiple databases.
Database::startLog final public static function Starts logging a given logging key on the specified connection.
doc_Drupal
2016-10-29 08:59:27
Comments
Leave a Comment

Please login to continue.