You are here

class Connection in Drupal 10

Same name in this branch
  1. 10 core/tests/fixtures/database_drivers/custom/corefake/Connection.php \Drupal\Driver\Database\corefake\Connection
  2. 10 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
  3. 10 core/tests/fixtures/database_drivers/core/corefake/Connection.php \Drupal\Core\Database\Driver\corefake\Connection
  4. 10 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
  5. 10 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
  6. 10 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
  7. 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection
  8. 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection
  9. 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection
  10. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php \Drupal\database_statement_monitoring_test\sqlite\Connection
  11. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php \Drupal\database_statement_monitoring_test\pgsql\Connection
  12. 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\Connection
  13. 10 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php \Drupal\corefake\Driver\Database\corefake\Connection
  14. 10 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Connection.php \Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Connection
  15. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysql\Connection
  16. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestPgsql\Connection
  17. 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection
Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\Connection
  2. 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\Connection

MySQL Connection class that can log executed queries.

Hierarchy

Expanded class hierarchy of Connection

File

core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php, line 11

Namespace

Drupal\database_statement_monitoring_test\mysql
View source
class Connection extends BaseConnection {
  use LoggedStatementsTrait;

}

Members

Namesort descending Modifiers Type Description Overrides
Connection::$identifierQuotes protected property
Connection::$needsCleanup protected property Flag to indicate if the cleanup function in __destruct() should run.
Connection::$serverVersion private property Stores the server version after it has been retrieved from the database.
Connection::$statementWrapperClass protected property
Connection::ACCESS_DENIED constant Error code for "Access denied" error.
Connection::createDatabase public function Overrides \Drupal\Core\Database\Connection::createDatabase().
Connection::databaseType public function
Connection::DATABASE_NOT_FOUND constant Error code for "Unknown database" error.
Connection::doCommit protected function
Connection::driver public function
Connection::getMariaDbVersionMatch protected function Gets the MariaDB portion of the server version.
Connection::getServerVersion protected function Gets the server version. 1
Connection::isMariaDb public function Determines whether the MySQL distribution is MariaDB or not. 1
Connection::mapConditionOperator public function
Connection::MIN_MAX_ALLOWED_PACKET constant The minimal possible value for the max_allowed_packet setting of MySQL.
Connection::nextId public function
Connection::nextIdDelete public function
Connection::open public static function
Connection::popCommittableTransactions protected function Overridden to work around issues to MySQL not supporting transactional DDL.
Connection::queryRange public function
Connection::rollBack public function
Connection::SQLSTATE_SYNTAX_ERROR constant SQLSTATE error code for "Syntax error or access rule violation".
Connection::UNKNOWN_CHARSET constant Driver-specific error code for "Unknown character set" error.
Connection::UNSUPPORTED_CHARSET constant Error code for "Can't initialize character set" error.
Connection::version public function 1
Connection::__construct public function
Connection::__destruct public function
LoggedStatementsTrait::$loggedStatements protected property Logged statements.
LoggedStatementsTrait::getDriverClass public function
LoggedStatementsTrait::getLoggedStatements public function Returns the executed queries.
LoggedStatementsTrait::query public function
LoggedStatementsTrait::resetLoggedStatements public function Resets logged statements.