public function SelectQuery::compiled

public SelectQuery::compiled()

Check whether a condition has been previously compiled.

Return value

TRUE if the condition has been previously compiled.

Overrides QueryConditionInterface::compiled

File

includes/database/select.inc, line 1090

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;
      }
    }
  }

  foreach ($this->union as $union) {
    if (!$union['query']->compiled()) {
      return FALSE;
    }
  }

  return TRUE;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!select.inc/function/SelectQuery::compiled/7.x