Check whether a condition has been previously compiled.

Return value

TRUE if the condition has been previously compiled.

Overrides QueryConditionInterface::compiled

2 calls to SelectQuery::compiled()
SelectQuery::arguments in includes/database/select.inc
Gets a complete list of all values to insert into the prepared statement.
SelectQuery::__toString in includes/database/select.inc
Implements PHP magic __toString method to convert the query to a string.

File

includes/database/select.inc, line 1116

Class

SelectQuery
Query builder for SELECT statements.

Code

public function compiled() {
  if (!$this->where
    ->compiled() || !$this->having
    ->compiled()) {
    return FALSE;
  }
  foreach ($this->tables as $table) {

    // If this table is a subquery, check its status recursively.
    if ($table['table'] instanceof SelectQueryInterface) {
      if (!$table['table']
        ->compiled()) {
        return FALSE;
      }
    }
    if (!empty($table['condition']) && $table['condition'] instanceof QueryConditionInterface) {
      if (!$table['condition']
        ->compiled()) {
        return FALSE;
      }
    }
  }
  foreach ($this->union as $union) {
    if (!$union['query']
      ->compiled()) {
      return FALSE;
    }
  }
  return TRUE;
}