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 329
Non-specific Database query code. Used by all engines.

Class

Query
Base class for query builders.

Code

public function __construct(DatabaseConnection $connection, $options) {
  $this->uniqueIdentifier = uniqid('', TRUE);

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

  $this->queryOptions = $options;
}