class Connection in Drupal 10
Same name in this branch
- 10 core/tests/fixtures/database_drivers/custom/corefake/Connection.php \Drupal\Driver\Database\corefake\Connection
- 10 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
- 10 core/tests/fixtures/database_drivers/core/corefake/Connection.php \Drupal\Core\Database\Driver\corefake\Connection
- 10 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
- 10 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
- 10 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
- 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection
- 10 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection
- 10 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection
- 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php \Drupal\database_statement_monitoring_test\sqlite\Connection
- 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php \Drupal\database_statement_monitoring_test\pgsql\Connection
- 10 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\Connection
- 10 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php \Drupal\corefake\Driver\Database\corefake\Connection
- 10 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Connection.php \Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Connection
- 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysql\Connection
- 10 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestPgsql\Connection
- 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
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection
- 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection
MySQL test implementation of \Drupal\Core\Database\Connection.
Hierarchy
- class \Drupal\mysql\Driver\Database\mysql\Connection extends \Drupal\Core\Database\Connection
- class \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection
Expanded class hierarchy of Connection
File
- core/
modules/ system/ tests/ modules/ driver_test/ src/ Driver/ Database/ DrivertestMysqlDeprecatedVersion/ Connection.php, line 12
Namespace
Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersionView source
class Connection extends CoreConnection {
/**
* Hardcoded database server version.
*
* Faking that we are on a deprecated database.
*
* @var string
*/
protected $databaseVersion = '10.2.31-MariaDB-1:10.2.31+maria~bionic-log';
/**
* {@inheritdoc}
*/
public function driver() {
return 'DrivertestMysqlDeprecatedVersion';
}
/**
* {@inheritdoc}
*/
public function isMariaDb() : bool {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function version() {
return $this->databaseVersion;
}
/**
* {@inheritdoc}
*/
protected function getServerVersion() : string {
return $this->databaseVersion;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Connection:: |
protected | property | Hardcoded database server version. | |
Connection:: |
protected | property | ||
Connection:: |
protected | property | Flag to indicate if the cleanup function in __destruct() should run. | |
Connection:: |
private | property | Stores the server version after it has been retrieved from the database. | |
Connection:: |
protected | property | ||
Connection:: |
constant | Error code for "Access denied" error. | ||
Connection:: |
public | function | Overrides \Drupal\Core\Database\Connection::createDatabase(). | |
Connection:: |
public | function | ||
Connection:: |
constant | Error code for "Unknown database" error. | ||
Connection:: |
protected | function | ||
Connection:: |
public | function |
Overrides Connection:: |
|
Connection:: |
protected | function | Gets the MariaDB portion of the server version. | |
Connection:: |
protected | function |
Gets the server version. Overrides Connection:: |
|
Connection:: |
public | function |
Determines whether the MySQL distribution is MariaDB or not. Overrides Connection:: |
|
Connection:: |
public | function | ||
Connection:: |
constant | The minimal possible value for the max_allowed_packet setting of MySQL. | ||
Connection:: |
public | function | ||
Connection:: |
public | function | ||
Connection:: |
public static | function | ||
Connection:: |
protected | function | Overridden to work around issues to MySQL not supporting transactional DDL. | |
Connection:: |
public | function | ||
Connection:: |
public | function | ||
Connection:: |
constant | SQLSTATE error code for "Syntax error or access rule violation". | ||
Connection:: |
constant | Driver-specific error code for "Unknown character set" error. | ||
Connection:: |
constant | Error code for "Can't initialize character set" error. | ||
Connection:: |
public | function |
Overrides Connection:: |
|
Connection:: |
public | function | ||
Connection:: |
public | function |