Database::setActiveConnection

final public static Database::setActiveConnection($key = 'default') Sets the active connection to the specified key. Return value string|null The previous database connection key. File core/lib/Drupal/Core/Database/Database.php, line 191 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code final public static function setActiveConnection($key = 'default') { if (!empty(self::$databaseInfo[$key])) { $old_key = self::$activeKey; s

Database::RETURN_STATEMENT

Flag to indicate a query call should return the prepared statement. File core/lib/Drupal/Core/Database/Database.php, line 25 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code const RETURN_STATEMENT = 1;

Database::RETURN_NULL

Flag to indicate a query call should simply return NULL. This is used for queries that have no reasonable return value anyway, such as INSERT statements to a table without a serial primary key. File core/lib/Drupal/Core/Database/Database.php, line 20 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code const RETURN_NULL = 0;

Database::RETURN_INSERT_ID

Flag to indicate a query call should return the "last insert id". File core/lib/Drupal/Core/Database/Database.php, line 35 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code const RETURN_INSERT_ID = 3;

Database::RETURN_AFFECTED

Flag to indicate a query call should return the number of affected rows. File core/lib/Drupal/Core/Database/Database.php, line 30 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code const RETURN_AFFECTED = 2;

Database::renameConnection

final public static Database::renameConnection($old_key, $new_key) Rename a connection and its corresponding connection information. Parameters string $old_key: The old connection key. string $new_key: The new connection key. Return value bool TRUE in case of success, FALSE otherwise. File core/lib/Drupal/Core/Database/Database.php, line 306 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code final public static function renameConnecti

Database::removeConnection

final public static Database::removeConnection($key) Remove a connection and its corresponding connection information. Parameters string $key: The connection key. Return value bool TRUE in case of success, FALSE otherwise. File core/lib/Drupal/Core/Database/Database.php, line 334 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code final public static function removeConnection($key) { if (isset(self::$databaseInfo[$key])) { self::

Database::parseConnectionInfo

final public static Database::parseConnectionInfo(array $info) Process the configuration file for database information. Parameters array $info: The database connection information, as defined in settings.php. The structure of this array depends on the database driver it is connecting to. File core/lib/Drupal/Core/Database/Database.php, line 207 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code final public static function parseConnect

Database::openConnection

final protected static Database::openConnection($key, $target) Opens a connection to the server specified by the given key and target. Parameters string $key: The database connection key, as specified in settings.php. The default is "default". string $target: The database target to open. Throws \Drupal\Core\Database\ConnectionNotDefinedException \Drupal\Core\Database\DriverNotSpecifiedException File core/lib/Drupal/Core/Database/Database.php, line 357 Class Database Primary front-control

Database::isActiveConnection

final public static Database::isActiveConnection() Determines if there is an active connection. Note that this method will return FALSE if no connection has been established yet, even if one could be. Return value bool TRUE if there is at least one database connection established, FALSE otherwise. File core/lib/Drupal/Core/Database/Database.php, line 181 Class Database Primary front-controller for the database system. Namespace Drupal\Core\Database Code final public static function is