You are here

public function Query::getConnection in Drupal 9

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Database/Query/Query.php \Drupal\Core\Database\Query\Query::getConnection()

Gets the database connection to be used for the query.

Return value

\Drupal\Core\Database\Connection The database connection to be used for the query.

File

core/lib/Drupal/Core/Database/Query/Query.php, line 188

Class

Query
Base class for query builders.

Namespace

Drupal\Core\Database\Query

Code

public function getConnection() {
  return $this->connection;
}