1 query.inc public Query::__construct(DatabaseConnection $connection, $options)

Constructs a Query object.

Parameters

DatabaseConnection $connection: Database connection object.

array $options: Array of query options.

File

core/includes/database/query.inc, line 337
Non-specific Database query code. Used by all engines.

Class

Query
Base class for query builders.

Code

public function __construct(DatabaseConnection $connection, $options) { // phpcs:ignore -- No type hint on $options, add in 2.x.
  $this->uniqueIdentifier = uniqid('', TRUE);

  $this->connection = $connection;
  $this->connectionKey = $this->connection->getKey();
  $this->connectionTarget = $this->connection->getTarget();

  $this->queryOptions = $options;
}