You are here

public function Query::__construct in Drupal 7

Constructs a Query object.

Parameters

DatabaseConnection $connection: Database connection object.

array $options: Array of query options.

6 calls to Query::__construct()
DeleteQuery::__construct in includes/database/query.inc
Constructs a DeleteQuery object.
InsertQuery::__construct in includes/database/query.inc
Constructs an InsertQuery object.
MergeQuery::__construct in includes/database/query.inc
Constructs a MergeQuery object.
SelectQuery::__construct in includes/database/select.inc
Constructs a Query object.
TruncateQuery::__construct in includes/database/query.inc
Constructs a TruncateQuery object.

... See full list

6 methods override Query::__construct()
DeleteQuery::__construct in includes/database/query.inc
Constructs a DeleteQuery object.
InsertQuery::__construct in includes/database/query.inc
Constructs an InsertQuery object.
MergeQuery::__construct in includes/database/query.inc
Constructs a MergeQuery object.
SelectQuery::__construct in includes/database/select.inc
Constructs a Query object.
TruncateQuery::__construct in includes/database/query.inc
Constructs a TruncateQuery object.

... See full list

File

includes/database/query.inc, line 330
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;
}