class Connection

Same name in this branch
  1. 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php \Drupal\core_fake\Driver\Database\CoreFake\Connection
  2. 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Connection
  3. 10 core/tests/fixtures/database_drivers/core/CoreFake/Connection.php \Drupal\Core\Database\Driver\CoreFake\Connection
  4. 10 core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php \Drupal\Driver\Database\CoreFake\Connection
  5. 10 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
  6. 10 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
  7. 10 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
  8. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
Same name and namespace in other branches
  1. 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php \Drupal\corefake\Driver\Database\corefake\Connection
  2. 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Connection.php \Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Connection
  3. 9 core/tests/fixtures/database_drivers/core/corefake/Connection.php \Drupal\Core\Database\Driver\corefake\Connection
  4. 9 core/tests/fixtures/database_drivers/custom/corefake/Connection.php \Drupal\Driver\Database\corefake\Connection
  5. 9 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
  6. 9 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
  7. 9 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
  8. 9 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
  9. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
  10. 8.9.x core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php \Drupal\corefake\Driver\Database\corefake\Connection
  11. 8.9.x core/tests/fixtures/database_drivers/core/corefake/Connection.php \Drupal\Core\Database\Driver\corefake\Connection
  12. 8.9.x core/tests/fixtures/database_drivers/custom/corefake/Connection.php \Drupal\Driver\Database\corefake\Connection
  13. 8.9.x core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
  14. 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
  15. 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
  16. 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
  17. 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
  18. 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php \Drupal\core_fake\Driver\Database\CoreFake\Connection
  19. 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Connection
  20. 11.x core/tests/fixtures/database_drivers/core/CoreFake/Connection.php \Drupal\Core\Database\Driver\CoreFake\Connection
  21. 11.x core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php \Drupal\Driver\Database\CoreFake\Connection
  22. 11.x core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
  23. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
  24. 11.x core/modules/system/tests/modules/dummydb/src/Driver/Database/dummydb/Connection.php \Drupal\dummydb\Driver\Database\dummydb\Connection
  25. 11.x core/modules/mysqli/src/Driver/Database/mysqli/Connection.php \Drupal\mysqli\Driver\Database\mysqli\Connection

MySQL implementation of \Drupal\Core\Database\Connection.

Hierarchy

  • class \Drupal\Core\Database\Driver\mysql\Connection

Expanded class hierarchy of Connection

Deprecated

in drupal:9.4.0 and is removed from drupal:11.0.0. The MySQL database driver has been moved to the mysql module.

See also

https://www.drupal.org/node/3129492

4 string references to 'Connection'
FileTransfer::__get in core/lib/Drupal/Core/FileTransfer/FileTransfer.php
Implements the magic __get() method.
FileTransfer::__isset in core/lib/Drupal/Core/FileTransfer/FileTransfer.php
FileTransfer::__set in core/lib/Drupal/Core/FileTransfer/FileTransfer.php
FileTransfer::__unset in core/lib/Drupal/Core/FileTransfer/FileTransfer.php

File

core/lib/Drupal/Core/Database/Driver/mysql/Connection.php, line 17

Namespace

Drupal\Core\Database\Driver\mysql
View source
class Connection extends MysqlConnection {

}

Members

Title Sort descending Deprecated Modifiers Object type Summary Overrides
Connection::$connection protected property The actual client connection.
Connection::$connectionOptions protected property The connection information for this connection object.
Connection::$driverClasses protected property Index of what driver-specific class to use for various operations.
Connection::$enabledEvents private property Tracks the database API events to be dispatched.
Connection::$escapedAliases protected property List of escaped aliases names, keyed by unescaped aliases.
Connection::$escapedFields protected property List of escaped field names, keyed by unescaped names.
Connection::$escapedTables protected property List of escaped table names, keyed by unescaped names.
Connection::$key protected property The key representing this connection.
Connection::$logger protected property The current database logging object for this connection.
Connection::$prefix protected property The prefix used by this database connection.
Connection::$prefixes Deprecated protected property The prefixes used by this database connection.
Connection::$prefixReplace Deprecated protected property List of replacement values for use in prefixTables().
Connection::$prefixSearch Deprecated protected property List of search values for use in prefixTables().
Connection::$rootTransactionEndCallbacks Deprecated protected property Post-root (non-nested) transaction commit callbacks.
Connection::$schema protected property The schema object for this connection. 5
Connection::$tablePlaceholderReplacements protected property Replacements to fully qualify {table} placeholders in SQL strings.
Connection::$target protected property The database target this connection is for.
Connection::$transactionalDDLSupport protected property Whether this database connection supports transactional DDL. 2
Connection::$transactionLayers Deprecated protected property Tracks the number of "layers" of transactions currently active.
Connection::$transactionManager protected property The transaction manager.
Connection::$unprefixedTablesMap Deprecated protected property List of un-prefixed table names, keyed by prefixed table names.
Connection::addRootTransactionEndCallback Deprecated public function Adds a root transaction end callback.
Connection::attachDatabase public function Allows the connection to access additional databases. 1
Connection::clientVersion public function Returns the version of the database client.
Connection::commit Deprecated public function Throws an exception to deny direct access to transaction commits.
Connection::commitAll public function Commits all the open transactions.
Connection::createConnectionOptionsFromUrl public static function Creates an array of database connection options from a URL. 1
Connection::createUrlFromConnectionOptions public static function Creates a URL from an array of database connection options. 1
Connection::defaultOptions protected function Returns the default query options for any given query.
Connection::disableEvents public function Disables database API events dispatching.
Connection::dispatchEvent public function Dispatches a database API event via the container dispatcher.
Connection::doCommit Deprecated protected function Do the actual commit, invoke post-commit callbacks.
Connection::enableEvents public function Enables database API events dispatching.
Connection::escapeAlias public function Escapes an alias name string.
Connection::escapeDatabase public function Escapes a database name string.
Connection::escapeField public function Escapes a field name string.
Connection::escapeLike public function Escapes characters that work as wildcard characters in a LIKE pattern.
Connection::escapeTable public function Escapes a table name string.
Connection::expandArguments protected function Expands out shorthand placeholders.
Connection::filterComment protected function Sanitize a query comment string.
Connection::findCallerFromDebugBacktrace public function Determine the last non-database method that called the database API.
Connection::getClientConnection public function Returns the client-level database connection object.
Connection::getConnectionOptions public function Returns the connection information for this connection object.
Connection::getDebugBacktrace protected function Gets the debug backtrace.
Connection::getDriverClass public function Gets the driver-specific override class if any for the specified class.
Connection::getFullQualifiedTableName public function Get a fully qualified table name. 2
Connection::getKey public function Returns the key this connection is associated with.
Connection::getLogger public function Gets the current logging object for this connection.
Connection::getPagerManager public function Get the pager manager service, if available.
Connection::getPrefix public function Returns the prefix of the tables.
Connection::getProvider public function Get the module name of the module that is providing the database driver.
Connection::getSQLState protected static function Extracts the SQLSTATE error from a PDOException.
Connection::getTarget public function Returns the target this connection is associated with.
Connection::getUnprefixedTablesMap Deprecated public function Gets a list of individually prefixed table names.
Connection::hasJson public function Runs a simple query to validate json datatype support. 1
Connection::inTransaction public function Determines if there is an active transaction open.
Connection::isEventEnabled public function Returns the status of a database API event toggle.
Connection::lastInsertId public function Returns the ID of the last inserted row or sequence value.
Connection::makeComment public function Flatten an array of query comments into a single comment string.
Connection::makeSequenceName Deprecated public function Creates the appropriate sequence name for a given table and serial field. 1
Connection::popCommittableTransactions Deprecated protected function Commit all the transaction layers that can commit.
Connection::popTransaction Deprecated public function Decreases the depth of transaction nesting.
Connection::prefixTables public function Appends a database prefix to all tables in a query.
Connection::prepareStatement public function Returns a prepared statement given a SQL string. 2
Connection::preprocessStatement protected function Returns a string SQL statement ready for preparation.
Connection::pushTransaction Deprecated public function Increases the depth of transaction nesting.
Connection::query public function Executes a query string against the database. 1
Connection::quote public function Quotes a string for use in a query.
Connection::quoteIdentifiers public function Quotes all identifiers in a query.
Connection::removeDatabaseEntriesFromDebugBacktrace public static function Removes database related calls from a backtrace array.
Connection::rollBack Deprecated public function Rolls back the transaction entirely or to a named savepoint.
Connection::setKey public function Tells this connection object what its key is.
Connection::setLogger public function Associates a logging object with this connection.
Connection::setPrefix protected function Set the prefix used by this database connection. 1
Connection::setTarget public function Tells this connection object what its target value is.
Connection::supportsTransactionalDDL public function Determines if this driver supports transactional DDL.
Connection::tablePrefix Deprecated public function Find the prefix for a table.
Connection::transactionDepth Deprecated public function Determines the current transaction depth.
Connection::transactionManager public function Returns the transaction manager.
Connection::__sleep public function Prevents the database connection from being serialized.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.