Connection::escapeAlias

public Connection::escapeAlias($field) Escapes an alias name string. Force all alias names to be strictly alphanumeric-plus-underscore. In contrast to DatabaseConnection::escapeField() / DatabaseConnection::escapeTable(), this doesn't allow the period (".") because that is not allowed in aliases. Parameters string $field: An unsanitized alias name. Return value string The sanitized alias name. File core/lib/Drupal/Core/Database/Connection.php, line 979 Class Connection Base Database API

Connection::driver

public Connection::driver() Returns the type of database driver. This is not necessarily the same as the type of the database itself. For instance, there could be two MySQL drivers, mysql and mysql_mock. This function would return different values for each, but both would return "mysql" for databaseType(). Return value string The type of database driver. Overrides Connection::driver File core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 348 Class Connection SQLite implement

Connection::driver

public Connection::driver() Returns the type of database driver. This is not necessarily the same as the type of the database itself. For instance, there could be two MySQL drivers, mysql and mysql_mock. This function would return different values for each, but both would return "mysql" for databaseType(). Return value string The type of database driver. Overrides Connection::driver File core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php, line 264 Class Connection PostgreSQL implem

Connection::driver

public Connection::driver() Returns the type of database driver. This is not necessarily the same as the type of the database itself. For instance, there could be two MySQL drivers, mysql and mysql_mock. This function would return different values for each, but both would return "mysql" for databaseType(). Return value string The type of database driver. Overrides Connection::driver File core/lib/Drupal/Core/Database/Driver/mysql/Connection.php, line 208 Class Connection MySQL implementat

Connection::driver

abstract public Connection::driver() Returns the type of database driver. This is not necessarily the same as the type of the database itself. For instance, there could be two MySQL drivers, mysql and mysql_mock. This function would return different values for each, but both would return "mysql" for databaseType(). Return value string The type of database driver. File core/lib/Drupal/Core/Database/Connection.php, line 1264 Class Connection Base Database API class. Namespace Drupal\Core

Connection::doEscape

protected Connection::doEscape($string) Escape a string if needed. Parameters $string: The string to escape. Return value string The escaped string. File core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php, line 252 Class Connection PostgreSQL implementation of \Drupal\Core\Database\Connection. Namespace Drupal\Core\Database\Driver\pgsql Code protected function doEscape($string) { // Quote identifier to make it case-sensitive. if (preg_match('/[A-Z]/', $string)) { $stri

Connection::destroy

public Connection::destroy() Destroys this Connection object. PHP does not destruct an object if it is still referenced in other variables. In case of PDO database connection objects, PHP only closes the connection when the PDO object is destructed, so any references to this object may cause the number of maximum allowed connections to be exceeded. File core/lib/Drupal/Core/Database/Connection.php, line 186 Class Connection Base Database API class. Namespace Drupal\Core\Database Code p

Connection::delete

public Connection::delete($table, array $options = array()) Prepares and returns a DELETE query object. Parameters string $table: The table to use for the delete statement. array $options: (optional) An array of options on the query. Return value \Drupal\Core\Database\Query\Delete A new Delete query object. See also \Drupal\Core\Database\Query\Delete File core/lib/Drupal/Core/Database/Connection.php, line 875 Class Connection Base Database API class. Namespace Drupal\Core\Database C

Connection::defaultOptions

protected Connection::defaultOptions() Returns the default query options for any given query. A given query can be customized with a number of option flags in an associative array: target: The database "target" against which to execute a query. Valid values are "default" or "replica". The system will first try to open a connection to a database specified with the user-supplied key. If one is not available, it will silently fall back to the "default" target. If multiple databases connections ar

Connection::DATABASE_NOT_FOUND

Error code for "Unable to open database file" error. File core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php, line 17 Class Connection SQLite implementation of \Drupal\Core\Database\Connection. Namespace Drupal\Core\Database\Driver\sqlite Code const DATABASE_NOT_FOUND = 14;