class Connection
Same name in this branch
- 10 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\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/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\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/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/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\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/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection
- 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php \Drupal\core_fake\Driver\Database\CoreFake\Connection
- 10 core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Connection
- 10 core/tests/fixtures/database_drivers/core/CoreFake/Connection.php \Drupal\Core\Database\Driver\CoreFake\Connection
- 10 core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php \Drupal\Driver\Database\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/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
- 10 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
- 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
Same name in other branches
- 9 core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection
- 9 core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection
- 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php \Drupal\database_statement_monitoring_test\sqlite\Connection
- 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\Connection
- 9 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php \Drupal\database_statement_monitoring_test\pgsql\Connection
- 9 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysql\Connection
- 9 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/DrivertestPgsql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestPgsql\Connection
- 9 core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection
- 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php \Drupal\corefake\Driver\Database\corefake\Connection
- 9 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Connection.php \Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses\Connection
- 9 core/tests/fixtures/database_drivers/core/corefake/Connection.php \Drupal\Core\Database\Driver\corefake\Connection
- 9 core/tests/fixtures/database_drivers/custom/corefake/Connection.php \Drupal\Driver\Database\corefake\Connection
- 9 core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
- 9 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
- 9 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
- 9 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
- 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
- 8.9.x core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php \Drupal\database_statement_monitoring_test\sqlite\Connection
- 8.9.x core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php \Drupal\database_statement_monitoring_test\mysql\Connection
- 8.9.x core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php \Drupal\database_statement_monitoring_test\pgsql\Connection
- 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysql\Connection
- 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion\Connection
- 8.9.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php \Drupal\driver_test\Driver\Database\DrivertestPgsql\Connection
- 8.9.x core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php \Drupal\corefake\Driver\Database\corefake\Connection
- 8.9.x core/tests/fixtures/database_drivers/core/corefake/Connection.php \Drupal\Core\Database\Driver\corefake\Connection
- 8.9.x core/tests/fixtures/database_drivers/custom/corefake/Connection.php \Drupal\Driver\Database\corefake\Connection
- 8.9.x core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
- 8.9.x core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php \Drupal\Core\Database\Driver\sqlite\Connection
- 8.9.x core/lib/Drupal/Core/Database/Driver/mysql/Connection.php \Drupal\Core\Database\Driver\mysql\Connection
- 8.9.x core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php \Drupal\Core\Database\Driver\pgsql\Connection
- 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
- 11.x core/modules/sqlite/src/Driver/Database/sqlite/Connection.php \Drupal\sqlite\Driver\Database\sqlite\Connection
- 11.x core/modules/mysql/src/Driver/Database/mysql/Connection.php \Drupal\mysql\Driver\Database\mysql\Connection
- 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql/Connection.php \Drupal\driver_test\Driver\Database\DriverTestMysql\Connection
- 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestMysqlDeprecatedVersion/Connection.php \Drupal\driver_test\Driver\Database\DriverTestMysqlDeprecatedVersion\Connection
- 11.x core/modules/system/tests/modules/driver_test/src/Driver/Database/DriverTestPgsql/Connection.php \Drupal\driver_test\Driver\Database\DriverTestPgsql\Connection
- 11.x core/modules/pgsql/src/Driver/Database/pgsql/Connection.php \Drupal\pgsql\Driver\Database\pgsql\Connection
- 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake/Connection.php \Drupal\core_fake\Driver\Database\CoreFake\Connection
- 11.x core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Connection.php \Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses\Connection
- 11.x core/tests/fixtures/database_drivers/core/CoreFake/Connection.php \Drupal\Core\Database\Driver\CoreFake\Connection
- 11.x core/tests/fixtures/database_drivers/custom/CoreFake/Connection.php \Drupal\Driver\Database\CoreFake\Connection
- 11.x core/tests/fixtures/database_drivers/custom/fake/Connection.php \Drupal\Driver\Database\fake\Connection
- 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection
A fake Connection class for testing purposes.
Hierarchy
- class \Drupal\Driver\Database\fake\Connection extends \Drupal\Core\Database\Connection
Expanded class hierarchy of Connection
3 files declare their use of Connection
- Connection.php in core/
tests/ fixtures/ database_drivers/ module/ core_fake/ src/ Driver/ Database/ CoreFake/ Connection.php - Connection.php in core/
tests/ fixtures/ database_drivers/ module/ core_fake/ src/ Driver/ Database/ CoreFakeWithAllCustomClasses/ Connection.php - Connection.php in core/
tests/ fixtures/ database_drivers/ core/ CoreFake/ Connection.php
5 string references to 'Connection'
- DriverSpecificConnectionUnitTestBase::testConnectionOpen in core/
tests/ Drupal/ KernelTests/ Core/ Database/ DriverSpecificConnectionUnitTestBase.php - Tests pdo options override.
- 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/
tests/ fixtures/ database_drivers/ custom/ fake/ Connection.php, line 21
Namespace
Drupal\Driver\Database\fakeView source
class Connection extends CoreConnection {
/**
* {@inheritdoc}
*/
protected $statementClass = NULL;
/**
* {@inheritdoc}
*/
protected $statementWrapperClass = StatementWrapper::class;
/**
* {@inheritdoc}
*/
protected $identifierQuotes = [
'"',
'"',
];
/**
* Public property so we can test driver loading mechanism.
*
* @var string
* @see driver().
*/
public $driver = 'fake';
/**
* {@inheritdoc}
*/
public function queryRange($query, $from, $count, array $args = [], array $options = []) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function driver() {
return $this->driver;
}
/**
* {@inheritdoc}
*/
public function databaseType() {
return 'fake';
}
/**
* {@inheritdoc}
*/
public function createDatabase($database) {
}
/**
* {@inheritdoc}
*/
public function mapConditionOperator($operator) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function nextId($existing_id = 0) {
@trigger_error('Drupal\\Core\\Database\\Connection::nextId() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Modules should use instead the keyvalue storage for the last used id. See https://www.drupal.org/node/3349345', E_USER_DEPRECATED);
return 0;
}
/**
* {@inheritdoc}
*/
public function exceptionHandler() {
return new ExceptionHandler();
}
/**
* {@inheritdoc}
*/
public function select($table, $alias = NULL, array $options = []) {
return new Select($this, $table, $alias, $options);
}
/**
* {@inheritdoc}
*/
public function insert($table, array $options = []) {
return new Insert($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function merge($table, array $options = []) {
return new Merge($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function upsert($table, array $options = []) {
return new Upsert($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function update($table, array $options = []) {
return new Update($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function delete($table, array $options = []) {
return new Delete($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function truncate($table, array $options = []) {
return new Truncate($this, $table, $options);
}
/**
* {@inheritdoc}
*/
public function schema() {
if (empty($this->schema)) {
$this->schema = new Schema($this);
}
return $this->schema;
}
/**
* {@inheritdoc}
*/
public function condition($conjunction) {
return new Condition($conjunction, FALSE);
}
/**
* {@inheritdoc}
*/
public function startTransaction($name = '') {
return new Transaction($this, $name);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
Connection::$driver | public | property | Public property so we can test driver loading mechanism. | 3 |
Connection::$identifierQuotes | protected | property | ||
Connection::$statementClass | protected | property | ||
Connection::$statementWrapperClass | protected | property | ||
Connection::condition | public | function | 1 | |
Connection::createDatabase | public | function | ||
Connection::databaseType | public | function | ||
Connection::delete | public | function | 1 | |
Connection::driver | public | function | 3 | |
Connection::exceptionHandler | public | function | 1 | |
Connection::insert | public | function | 1 | |
Connection::mapConditionOperator | public | function | ||
Connection::merge | public | function | 1 | |
Connection::nextId | public | function | ||
Connection::queryRange | public | function | ||
Connection::schema | public | function | 1 | |
Connection::select | public | function | 1 | |
Connection::startTransaction | public | function | 1 | |
Connection::truncate | public | function | 1 | |
Connection::update | public | function | 1 | |
Connection::upsert | public | function | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.