On this page
public function Select::compiled
public Select::compiled()
Check whether a condition has been previously compiled.
Return value
TRUE if the condition has been previously compiled.
Overrides QueryConditionTrait::compiled
File
- core/lib/Drupal/Core/Database/Query/Select.php, line 251
Class
- Select
- Query builder for SELECT statements.
Namespace
Drupal\Core\Database\QueryCode
public function compiled() {
if (!$this->condition->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 SelectInterface) {
if (!$table['table']->compiled()) {
return FALSE;
}
}
if (!empty($table['condition']) && $table['condition'] instanceof ConditionInterface) {
if (!$table['condition']->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/core!lib!Drupal!Core!Database!Query!Select.php/function/Select::compiled/8.1.x