Connection.php in Drupal 8
Same filename in this branch
- 8 core/lib/Drupal/Core/Database/Connection.php
- 8 core/tests/fixtures/database_drivers/custom/corefake/Connection.php
- 8 core/tests/fixtures/database_drivers/custom/fake/Connection.php
- 8 core/tests/fixtures/database_drivers/core/corefake/Connection.php
- 8 core/lib/Drupal/Core/Database/Driver/sqlite/Connection.php
- 8 core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
- 8 core/lib/Drupal/Core/Database/Driver/mysql/Connection.php
- 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/sqlite/Connection.php
- 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/pgsql/Connection.php
- 8 core/modules/system/tests/modules/database_statement_monitoring_test/src/mysql/Connection.php
- 8 core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefake/Connection.php
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Connection.php
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Connection.php
- 8 core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Connection.php
Same filename and directory in other branches
Namespace
Drupal\Driver\Database\fakeFile
core/tests/fixtures/database_drivers/custom/fake/Connection.phpView source
<?php
namespace Drupal\Driver\Database\fake;
use Drupal\Core\Database\Connection as CoreConnection;
use Drupal\Core\Database\StatementEmpty;
/**
* A fake Connection class for testing purposes.
*/
class Connection extends CoreConnection {
/**
* 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 new StatementEmpty();
}
/**
* {@inheritdoc}
*/
public function queryTemporary($query, array $args = [], array $options = []) {
return '';
}
/**
* {@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) {
return 0;
}
}
Classes
Name | Description |
---|---|
Connection | A fake Connection class for testing purposes. |